pub struct ExtDuration<const US: u16 = 1>(/* private fields */);
Expand description
A 24-bit isochronous duration (in microseconds)
Implementations§
Source§impl<const US: u16> ExtDuration<US>
impl<const US: u16> ExtDuration<US>
Sourcepub fn from_micros(val: u64) -> Self
pub fn from_micros(val: u64) -> Self
Create an instance from microseconds.
Sourcepub fn from_millis(val: u32) -> Self
pub fn from_millis(val: u32) -> Self
Create an instance from milliseconds.
Trait Implementations§
Source§impl<const US: u16> ByteAlignedValue for ExtDuration<US>
impl<const US: u16> ByteAlignedValue for ExtDuration<US>
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<const US: u16> Clone for ExtDuration<US>
impl<const US: u16> Clone for ExtDuration<US>
Source§fn clone(&self) -> ExtDuration<US>
fn clone(&self) -> ExtDuration<US>
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<const US: u16> Debug for ExtDuration<US>
impl<const US: u16> Debug for ExtDuration<US>
Source§impl<const US: u16> Default for ExtDuration<US>
impl<const US: u16> Default for ExtDuration<US>
Source§fn default() -> ExtDuration<US>
fn default() -> ExtDuration<US>
Returns the “default value” for a type. Read more
Source§impl<const US: u16> FixedSizeValue for ExtDuration<US>
impl<const US: u16> FixedSizeValue for ExtDuration<US>
Source§impl<'de, const US: u16> FromHciBytes<'de> for &'de ExtDuration<US>
impl<'de, const US: u16> FromHciBytes<'de> for &'de ExtDuration<US>
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<const US: u16> Hash for ExtDuration<US>
impl<const US: u16> Hash for ExtDuration<US>
Source§impl<const US: u16> Ord for ExtDuration<US>
impl<const US: u16> Ord for ExtDuration<US>
Source§fn cmp(&self, other: &ExtDuration<US>) -> Ordering
fn cmp(&self, other: &ExtDuration<US>) -> 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<const US: u16> PartialEq for ExtDuration<US>
impl<const US: u16> PartialEq for ExtDuration<US>
Source§impl<const US: u16> PartialOrd for ExtDuration<US>
impl<const US: u16> PartialOrd for ExtDuration<US>
impl<const US: u16> Copy for ExtDuration<US>
impl<const US: u16> Eq for ExtDuration<US>
impl<const US: u16> StructuralPartialEq for ExtDuration<US>
Auto Trait Implementations§
impl<const US: u16> Freeze for ExtDuration<US>
impl<const US: u16> RefUnwindSafe for ExtDuration<US>
impl<const US: u16> Send for ExtDuration<US>
impl<const US: u16> Sync for ExtDuration<US>
impl<const US: u16> Unpin for ExtDuration<US>
impl<const US: u16> UnwindSafe for ExtDuration<US>
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.