#[repr(C, packed(1))]pub struct SyncPacketHeader {
pub handle: u16,
pub data_len: u8,
}
Expand description
HCI Synchronous Data packet header ๐ SyncPacketHeader
Fieldsยง
ยงhandle: u16
ยงdata_len: u8
Implementationsยง
Sourceยงimpl SyncPacketHeader
impl SyncPacketHeader
Sourcepub fn handle(&self) -> ConnHandle
pub fn handle(&self) -> ConnHandle
Connection_Handle
to be used to for transmitting a synchronous data packet or segment.
Sourcepub fn status(&self) -> SyncPacketStatus
pub fn status(&self) -> SyncPacketStatus
The Packet_Status_Flag
of the packet
Trait Implementationsยง
Sourceยงimpl ByteAlignedValue for SyncPacketHeader
impl ByteAlignedValue for SyncPacketHeader
Sourceยงfn ref_from_hci_bytes(data: &[u8]) -> Result<(&Self, &[u8]), FromHciBytesError>
fn ref_from_hci_bytes(data: &[u8]) -> Result<(&Self, &[u8]), FromHciBytesError>
Obtain a reference to this type from a byte slice. Read more
Sourceยงimpl Clone for SyncPacketHeader
impl Clone for SyncPacketHeader
Sourceยงfn clone(&self) -> SyncPacketHeader
fn clone(&self) -> SyncPacketHeader
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSourceยงimpl Debug for SyncPacketHeader
impl Debug for SyncPacketHeader
Sourceยงimpl FixedSizeValue for SyncPacketHeader
impl FixedSizeValue for SyncPacketHeader
Sourceยงimpl<'de> FromHciBytes<'de> for &'de SyncPacketHeader
impl<'de> FromHciBytes<'de> for &'de SyncPacketHeader
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 Hash for SyncPacketHeader
impl Hash for SyncPacketHeader
Sourceยงimpl Ord for SyncPacketHeader
impl Ord for SyncPacketHeader
Sourceยงfn cmp(&self, other: &SyncPacketHeader) -> Ordering
fn cmp(&self, other: &SyncPacketHeader) -> Ordering
1.21.0 ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Sourceยงimpl PartialEq for SyncPacketHeader
impl PartialEq for SyncPacketHeader
Sourceยงimpl PartialOrd for SyncPacketHeader
impl PartialOrd for SyncPacketHeader
impl Copy for SyncPacketHeader
impl Eq for SyncPacketHeader
impl StructuralPartialEq for SyncPacketHeader
Auto Trait Implementationsยง
impl Freeze for SyncPacketHeader
impl RefUnwindSafe for SyncPacketHeader
impl Send for SyncPacketHeader
impl Sync for SyncPacketHeader
impl Unpin for SyncPacketHeader
impl UnwindSafe for SyncPacketHeader
Blanket Implementationsยง
Sourceยงimpl<T> AsHciBytes for Twhere
T: FixedSizeValue,
impl<T> AsHciBytes for Twhere
T: FixedSizeValue,
Sourceยงfn as_hci_bytes(&self) -> &[u8]
fn as_hci_bytes(&self) -> &[u8]
Get the byte representation of this type.
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
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<'de, T> FromHciBytes<'de> for Twhere
T: FixedSizeValue,
impl<'de, T> FromHciBytes<'de> for Twhere
T: FixedSizeValue,
Sourceยงfn from_hci_bytes(data: &'de [u8]) -> Result<(T, &'de [u8]), FromHciBytesError>
fn from_hci_bytes(data: &'de [u8]) -> Result<(T, &'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, T> ReadHci<'de> for Twhere
T: FixedSizeValue,
impl<'de, T> ReadHci<'de> for Twhere
T: FixedSizeValue,
Sourceยงconst MAX_LEN: usize = const MAX_LEN: usize = core::mem::size_of::<Self>();
const MAX_LEN: usize = const MAX_LEN: usize = core::mem::size_of::<Self>();
Max length read by this type.
Sourceยงfn read_hci<R>(
reader: R,
buf: &'de mut [u8],
) -> Result<T, ReadHciError<<R as ErrorType>::Error>>where
R: Read,
fn read_hci<R>(
reader: R,
buf: &'de mut [u8],
) -> Result<T, ReadHciError<<R as ErrorType>::Error>>where
R: Read,
Read this type from the provided reader.
Sourceยงasync fn read_hci_async<R>(
reader: R,
buf: &'de mut [u8],
) -> Result<T, ReadHciError<<R as ErrorType>::Error>>where
R: Read,
async fn read_hci_async<R>(
reader: R,
buf: &'de mut [u8],
) -> Result<T, ReadHciError<<R as ErrorType>::Error>>where
R: Read,
Read this type from the provided reader, async version.