Struct wlan_common::time::TimeUnit
source · #[repr(C)]pub struct TimeUnit(pub u16);
Expand description
Representation of N IEEE 802.11 TimeUnits. A TimeUnit is defined as 1024 micro seconds. Note: Be careful with arithmetic operations on a TimeUnit. A TimeUnit is limited to 2 octets and can easily overflow. However, there is usually no need to ever work with TUs > 0xFFFF.
Tuple Fields§
§0: u16
Implementations§
source§impl TimeUnit
impl TimeUnit
pub const DEFAULT_BEACON_INTERVAL: Self = _
pub const MAX: Self = _
pub const fn into_micros(&self) -> i64
Trait Implementations§
source§impl AsBytes for TimeUnitwhere
u16: AsBytes,
HasPadding<TimeUnit, { _ }>: ShouldBe<{ _ }>,
impl AsBytes for TimeUnitwhere u16: AsBytes, HasPadding<TimeUnit, { _ }>: ShouldBe<{ _ }>,
§fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
§fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§impl FromBytes for TimeUnitwhere
u16: FromBytes,
impl FromBytes for TimeUnitwhere u16: FromBytes,
§fn read_from_prefix<B>(bytes: B) -> Option<Self>where
B: ByteSlice,
Self: Sized,
fn read_from_prefix<B>(bytes: B) -> Option<Self>where B: ByteSlice, Self: Sized,
§fn read_from_suffix<B>(bytes: B) -> Option<Self>where
B: ByteSlice,
Self: Sized,
fn read_from_suffix<B>(bytes: B) -> Option<Self>where B: ByteSlice, Self: Sized,
§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere Self: Sized,
Creates an instance of
Self
from zeroed bytes.source§impl Ord for TimeUnit
impl Ord for TimeUnit
source§impl PartialEq<TimeUnit> for TimeUnit
impl PartialEq<TimeUnit> for TimeUnit
source§impl PartialOrd<TimeUnit> for TimeUnit
impl PartialOrd<TimeUnit> for TimeUnit
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more