pub struct ChannelHopping<T: AsRef<[u8]>> { /* private fields */ }Expand description
A reader/writer for the Channel Hopping IE.
+-------------+-----+
| Sequence ID | ... |
+-------------+-----+
0 1Implementations§
Source§impl<T: AsRef<[u8]>> ChannelHopping<T>
impl<T: AsRef<[u8]>> ChannelHopping<T>
Sourcepub fn new(data: T) -> Result<Self>
pub fn new(data: T) -> Result<Self>
Create a new ChannelHopping reader/writer from a given buffer.
§Errors
Returns an error if the buffer is too small.
Sourcepub fn new_unchecked(data: T) -> Self
pub fn new_unchecked(data: T) -> Self
Create a new ChannelHopping reader/writer from a given buffer
without checking the length.
Sourcepub fn hopping_sequence_id(&self) -> u8
pub fn hopping_sequence_id(&self) -> u8
Return the hopping sequence ID field.
Source§impl<T: AsRef<[u8]> + AsMut<[u8]>> ChannelHopping<T>
impl<T: AsRef<[u8]> + AsMut<[u8]>> ChannelHopping<T>
Sourcepub fn set_hopping_sequence_id(&mut self, id: u8)
pub fn set_hopping_sequence_id(&mut self, id: u8)
Set the hopping sequence ID field.
Trait Implementations§
Source§impl<T: Clone + AsRef<[u8]>> Clone for ChannelHopping<T>
impl<T: Clone + AsRef<[u8]>> Clone for ChannelHopping<T>
Source§fn clone(&self) -> ChannelHopping<T>
fn clone(&self) -> ChannelHopping<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 ChannelHopping<T>
impl<T: Eq + AsRef<[u8]>> Eq for ChannelHopping<T>
impl<T: AsRef<[u8]>> StructuralPartialEq for ChannelHopping<T>
Auto Trait Implementations§
impl<T> Freeze for ChannelHopping<T>where
T: Freeze,
impl<T> RefUnwindSafe for ChannelHopping<T>where
T: RefUnwindSafe,
impl<T> Send for ChannelHopping<T>where
T: Send,
impl<T> Sync for ChannelHopping<T>where
T: Sync,
impl<T> Unpin for ChannelHopping<T>where
T: Unpin,
impl<T> UnwindSafe for ChannelHopping<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