trouble-host

Crates

git

Versions

default

Flavors

Type Alias HeaplessString

Source
pub type HeaplessString<const N: usize, LenT = usize> = StringInner<LenT, VecStorageInner<[MaybeUninit<u8>; N]>>;
Expand description

A fixed capacity String.

Aliased Type§

struct HeaplessString<const N: usize, LenT = usize> { /* private fields */ }

Trait Implementations§

Source§

impl<const N: usize> AsGatt for String<N>

Source§

const MIN_SIZE: usize = 0usize

The minimum size the type might be
Source§

const MAX_SIZE: usize = N

The maximum size the type might be
Source§

fn as_gatt(&self) -> &[u8]

Converts to gatt bytes. Must return a slice of len in MIN_SIZE..=MAX_SIZE
Source§

impl<const N: usize> FromGatt for String<N>

Source§

fn from_gatt(data: &[u8]) -> Result<Self, FromGattError>

Converts from gatt bytes. Must return FromGattError::InvalidLength if data.len not in MIN_SIZE..=MAX_SIZE