pub struct TschSynchronization<T: AsRef<[u8]>> { /* private fields */ }Expand description
A reader/writer for the TSCH synchronization IE.
+-----+-------------+
| ASN | Join metric |
+-----+-------------+
0 5 6Implementations§
Source§impl<T: AsRef<[u8]>> TschSynchronization<T>
impl<T: AsRef<[u8]>> TschSynchronization<T>
Sourcepub fn new(data: T) -> Result<Self>
pub fn new(data: T) -> Result<Self>
Create a new TschSynchronization reader/writer from a given buffer.
Sourcepub fn new_unchecked(data: T) -> Self
pub fn new_unchecked(data: T) -> Self
Create a new TschSynchronization reader/writer from a given buffer
without length checking.
Sourcepub fn absolute_slot_number(&self) -> u64
pub fn absolute_slot_number(&self) -> u64
Return the absolute slot number field.
Sourcepub fn join_metric(&self) -> u8
pub fn join_metric(&self) -> u8
Return the join metric field.
Source§impl<T: AsRef<[u8]> + AsMut<[u8]>> TschSynchronization<T>
impl<T: AsRef<[u8]> + AsMut<[u8]>> TschSynchronization<T>
Sourcepub fn set_absolute_slot_number(&mut self, asn: u64)
pub fn set_absolute_slot_number(&mut self, asn: u64)
Set the absolute slot number field.
Sourcepub fn set_join_metric(&mut self, join_metric: u8)
pub fn set_join_metric(&mut self, join_metric: u8)
Set the join metric field.
Trait Implementations§
Source§impl<T: Clone + AsRef<[u8]>> Clone for TschSynchronization<T>
impl<T: Clone + AsRef<[u8]>> Clone for TschSynchronization<T>
Source§fn clone(&self) -> TschSynchronization<T>
fn clone(&self) -> TschSynchronization<T>
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 moreimpl<T: Copy + AsRef<[u8]>> Copy for TschSynchronization<T>
impl<T: Eq + AsRef<[u8]>> Eq for TschSynchronization<T>
impl<T: AsRef<[u8]>> StructuralPartialEq for TschSynchronization<T>
Auto Trait Implementations§
impl<T> Freeze for TschSynchronization<T>where
T: Freeze,
impl<T> RefUnwindSafe for TschSynchronization<T>where
T: RefUnwindSafe,
impl<T> Send for TschSynchronization<T>where
T: Send,
impl<T> Sync for TschSynchronization<T>where
T: Sync,
impl<T> Unpin for TschSynchronization<T>where
T: Unpin,
impl<T> UnwindSafe for TschSynchronization<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