pub trait FromGatt: AsGatt {
// Required method
fn from_gatt(data: &[u8]) -> Result<Self, FromGattError>;
}
Expand description
Trait to allow conversion of gatt bytes into a type
Requires that the type implements AsGatt
Required Methods§
Sourcefn from_gatt(data: &[u8]) -> Result<Self, FromGattError>
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.