Trait tinkerforge::byte_converter::FromByteSlice
source · pub trait FromByteSlice {
// Required methods
fn from_le_byte_slice(bytes: &[u8]) -> Self;
fn bytes_expected() -> usize;
}
Expand description
A trait to deserialize the implemeting type from a byte slice.
Required Methods§
sourcefn from_le_byte_slice(bytes: &[u8]) -> Self
fn from_le_byte_slice(bytes: &[u8]) -> Self
Deserialize the implementing type from a byte slice.
sourcefn bytes_expected() -> usize
fn bytes_expected() -> usize
Returns how many bytes are expected to deserialize a instance of the implementing type. Currently this method is only used for strings.
Object Safety§
This trait is not object safe.