pub struct Fcf(pub u8);Expand description
Frame-control field wrapper.
Tuple Fields§
§0: u8Implementations§
Source§impl Fcf
impl Fcf
Sourcepub const fn new(
packet_type: PacketType,
full_source: bool,
options_present: bool,
flood_hops_present: bool,
) -> Self
pub const fn new( packet_type: PacketType, full_source: bool, options_present: bool, flood_hops_present: bool, ) -> Self
Build an FCF from structured flags.
Sourcepub const fn packet_type(self) -> PacketType
pub const fn packet_type(self) -> PacketType
Return the encoded packet type.
Sourcepub const fn full_source(self) -> bool
pub const fn full_source(self) -> bool
Return whether the source address is the full 32-byte public key.
Sourcepub const fn options_present(self) -> bool
pub const fn options_present(self) -> bool
Return whether an option block is present.
Sourcepub const fn flood_hops_present(self) -> bool
pub const fn flood_hops_present(self) -> bool
Return whether a flood-hop byte is present.
Trait Implementations§
impl Copy for Fcf
impl Eq for Fcf
impl StructuralPartialEq for Fcf
Auto Trait Implementations§
impl Freeze for Fcf
impl RefUnwindSafe for Fcf
impl Send for Fcf
impl Sync for Fcf
impl Unpin for Fcf
impl UnwindSafe for Fcf
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)