pub enum ControllerToHostPacket<'a> {
Acl(AclPacket<'a>),
Sync(SyncPacket<'a>),
Event(Event<'a>),
Iso(IsoPacket<'a>),
}
Expand description
Type representing valid deserialized HCI packets.
Variants§
Acl(AclPacket<'a>)
ACL packet.
Sync(SyncPacket<'a>)
Sync packet.
Event(Event<'a>)
Event packet.
Iso(IsoPacket<'a>)
Isochronous packet.
Implementations§
Source§impl<'a> ControllerToHostPacket<'a>
impl<'a> ControllerToHostPacket<'a>
Sourcepub fn kind(&self) -> PacketKind
pub fn kind(&self) -> PacketKind
The packet kind.
Sourcepub fn from_hci_bytes_with_kind(
kind: PacketKind,
data: &'a [u8],
) -> Result<(ControllerToHostPacket<'a>, &'a [u8]), FromHciBytesError>
pub fn from_hci_bytes_with_kind( kind: PacketKind, data: &'a [u8], ) -> Result<(ControllerToHostPacket<'a>, &'a [u8]), FromHciBytesError>
Deserialize data assuming a specific kind of packet.
Trait Implementations§
Source§impl<'a> Debug for ControllerToHostPacket<'a>
impl<'a> Debug for ControllerToHostPacket<'a>
Source§impl<'de> FromHciBytes<'de> for ControllerToHostPacket<'de>
impl<'de> FromHciBytes<'de> for ControllerToHostPacket<'de>
Source§fn from_hci_bytes(
data: &'de [u8],
) -> Result<(Self, &'de [u8]), FromHciBytesError>
fn from_hci_bytes( data: &'de [u8], ) -> Result<(Self, &'de [u8]), FromHciBytesError>
Deserialize bytes into a HCI type, return additional bytes.
Source§fn from_hci_bytes_complete(data: &'de [u8]) -> Result<Self, FromHciBytesError>
fn from_hci_bytes_complete(data: &'de [u8]) -> Result<Self, FromHciBytesError>
Deserialize bytes into a HCI type, must consume all bytes.
Source§impl<'de> ReadHci<'de> for ControllerToHostPacket<'de>
impl<'de> ReadHci<'de> for ControllerToHostPacket<'de>
Source§fn 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.
Source§async fn read_hci_async<R: Read>(
reader: R,
buf: &'de mut [u8],
) -> Result<Self, ReadHciError<R::Error>>
async fn read_hci_async<R: Read>( reader: R, buf: &'de mut [u8], ) -> Result<Self, ReadHciError<R::Error>>
Read this type from the provided reader, async version.
Auto Trait Implementations§
impl<'a> Freeze for ControllerToHostPacket<'a>
impl<'a> RefUnwindSafe for ControllerToHostPacket<'a>
impl<'a> Send for ControllerToHostPacket<'a>
impl<'a> Sync for ControllerToHostPacket<'a>
impl<'a> Unpin for ControllerToHostPacket<'a>
impl<'a> UnwindSafe for ControllerToHostPacket<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more