pub trait ReadHci<'de>: FromHciBytes<'de> {
const MAX_LEN: usize;
// Required methods
fn read_hci<R: Read>(
reader: R,
buf: &'de mut [u8],
) -> Result<Self, ReadHciError<R::Error>>;
fn read_hci_async<R: Read>(
reader: R,
buf: &'de mut [u8],
) -> impl Future<Output = Result<Self, ReadHciError<R::Error>>>;
}
Expand description
Adapter trait for deserializing HCI types from embedded-io implementations.
Required Associated Constants§
Required Methods§
Sourcefn read_hci<R: Read>(
reader: R,
buf: &'de mut [u8],
) -> Result<Self, ReadHciError<R::Error>>
fn read_hci<R: Read>( reader: R, buf: &'de mut [u8], ) -> Result<Self, ReadHciError<R::Error>>
Read this type from the provided reader.
Sourcefn read_hci_async<R: Read>(
reader: R,
buf: &'de mut [u8],
) -> impl Future<Output = Result<Self, ReadHciError<R::Error>>>
fn read_hci_async<R: Read>( reader: R, buf: &'de mut [u8], ) -> impl Future<Output = Result<Self, ReadHciError<R::Error>>>
Read this type from the provided reader, async version.
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.