pub struct TimeCorrection<T: AsRef<[u8]>> { /* private fields */ }Expand description
A reader/writer for the IEEE 802.15.4 Time Correction Header Information Element.
Implementations§
Source§impl<T: AsRef<[u8]>> TimeCorrection<T>
impl<T: AsRef<[u8]>> TimeCorrection<T>
Sourcepub fn new(buffer: T) -> Result<Self>
pub fn new(buffer: T) -> Result<Self>
Create a new TimeCorrection reader/writer from a given buffer.
§Errors
Returns an error if the buffer is too short.
Sourcepub fn new_unchecked(buffer: T) -> Self
pub fn new_unchecked(buffer: T) -> Self
Create a new TimeCorrection reader/writer from a given buffer
without length checking.
Sourcepub fn time_correction(&self) -> Duration
pub fn time_correction(&self) -> Duration
Return the time correction value in us.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TimeCorrection<T>where
T: Freeze,
impl<T> RefUnwindSafe for TimeCorrection<T>where
T: RefUnwindSafe,
impl<T> Send for TimeCorrection<T>where
T: Send,
impl<T> Sync for TimeCorrection<T>where
T: Sync,
impl<T> Unpin for TimeCorrection<T>where
T: Unpin,
impl<T> UnwindSafe for TimeCorrection<T>where
T: UnwindSafe,
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