Struct linkspace::prelude::NetPktHeader
#[repr(packed(1))]pub struct NetPktHeader {
pub prefix: AB<[u8; 3]>,
pub flags: NetFlags,
pub hop: U32,
pub stamp: U64,
pub ubits: [U32; 4],
}
Expand description
Variable fields in a crate::NetPkt used in point exchange
Fields§
§prefix: AB<[u8; 3]>
§flags: NetFlags
§hop: U32
§stamp: U64
§ubits: [U32; 4]
Implementations§
§impl NetPktHeader
impl NetPktHeader
pub const EMPTY: NetPktHeader = _
pub const fn as_bytes(&self) -> &[u8; 32]
pub const fn cfrom(b: [u8; 32]) -> NetPktHeader
pub const fn cinto(self) -> [u8; 32]
pub fn hop(self) -> NetPktHeader
pub fn with_flags(self, flags: NetFlags) -> NetPktHeader
pub fn and_flags(self, remove: NetFlags, insert: NetFlags) -> NetPktHeader
pub fn flags_u8(&self) -> &u8
pub fn mut_flags_u8(&mut self) -> &mut u8
Trait Implementations§
§impl Clone for NetPktHeader
impl Clone for NetPktHeader
§fn clone(&self) -> NetPktHeader
fn clone(&self) -> NetPktHeader
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 more§impl Debug for NetPktHeader
impl Debug for NetPktHeader
§impl Default for NetPktHeader
impl Default for NetPktHeader
§fn default() -> NetPktHeader
fn default() -> NetPktHeader
DEFAULT_ROUTING_BITS
§impl Display for NetPktHeader
impl Display for NetPktHeader
§impl From<B64> for NetPktHeader
impl From<B64> for NetPktHeader
§fn from(v: B64) -> NetPktHeader
fn from(v: B64) -> NetPktHeader
Converts to this type from the input type.
§impl From<NetOpts> for NetPktHeader
impl From<NetOpts> for NetPktHeader
§fn from(val: NetOpts) -> NetPktHeader
fn from(val: NetOpts) -> NetPktHeader
Converts to this type from the input type.
§impl From<NetPktHeader> for B64
impl From<NetPktHeader> for B64
§fn from(val: NetPktHeader) -> B64
fn from(val: NetPktHeader) -> B64
Converts to this type from the input type.
§impl PartialEq for NetPktHeader
impl PartialEq for NetPktHeader
§fn eq(&self, other: &NetPktHeader) -> bool
fn eq(&self, other: &NetPktHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl ToABE for NetPktHeader
impl ToABE for NetPktHeader
impl Copy for NetPktHeader
impl Eq for NetPktHeader
impl StructuralEq for NetPktHeader
impl StructuralPartialEq for NetPktHeader
Auto Trait Implementations§
impl RefUnwindSafe for NetPktHeader
impl Send for NetPktHeader
impl Sync for NetPktHeader
impl Unpin for NetPktHeader
impl UnwindSafe for NetPktHeader
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