pub struct TschTimeslot<T: AsRef<[u8]>> { /* private fields */ }Expand description
A reader/writer for the TSCH timeslot IE.
+----+--------------------------+
| ID | TSCH timeslot timings... |
+----+--------------------------+
0 1Implementations§
Source§impl<T: AsRef<[u8]>> TschTimeslot<T>
impl<T: AsRef<[u8]>> TschTimeslot<T>
Sourcepub const DEFAULT_ID: u8 = 0u8
pub const DEFAULT_ID: u8 = 0u8
The default timeslot ID.
Sourcepub fn new(data: T) -> Result<Self>
pub fn new(data: T) -> Result<Self>
Create a new TschTimeslot reader/writer from a given buffer.
Sourcepub fn new_unchecked(data: T) -> Self
pub fn new_unchecked(data: T) -> Self
Create a new TschTimeslot reader/writer from a given buffer without
length checking.
Sourcepub fn timeslot_timings(&self) -> TschTimeslotTimings
pub fn timeslot_timings(&self) -> TschTimeslotTimings
Return the TSCH timeslot timings.
Source§impl<T: AsRef<[u8]> + AsMut<[u8]>> TschTimeslot<T>
impl<T: AsRef<[u8]> + AsMut<[u8]>> TschTimeslot<T>
Sourcepub fn set_time_slot_id(&mut self, id: u8)
pub fn set_time_slot_id(&mut self, id: u8)
Set the TSCH timeslot ID field.
Trait Implementations§
Source§impl<T: Clone + AsRef<[u8]>> Clone for TschTimeslot<T>
impl<T: Clone + AsRef<[u8]>> Clone for TschTimeslot<T>
Source§fn clone(&self) -> TschTimeslot<T>
fn clone(&self) -> TschTimeslot<T>
Returns a copy 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 TschTimeslot<T>
impl<T: Eq + AsRef<[u8]>> Eq for TschTimeslot<T>
impl<T: AsRef<[u8]>> StructuralPartialEq for TschTimeslot<T>
Auto Trait Implementations§
impl<T> Freeze for TschTimeslot<T>where
T: Freeze,
impl<T> RefUnwindSafe for TschTimeslot<T>where
T: RefUnwindSafe,
impl<T> Send for TschTimeslot<T>where
T: Send,
impl<T> Sync for TschTimeslot<T>where
T: Sync,
impl<T> Unpin for TschTimeslot<T>where
T: Unpin,
impl<T> UnwindSafe for TschTimeslot<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