Trait Octets
pnet_packet::util
pub trait Octets { type Output; fn octets(&self) -> Self::Output; }
Convert a value to a byte array.
type Output
Output type - bytes array.
fn octets(&self) -> Self::Output
Return a value as bytes (big-endian order).
impl Octets for u64
type Output = [u8; 8]
impl Octets for u32
type Output = [u8; 4]
impl Octets for u16
type Output = [u8; 2]
impl Octets for u8
type Output = [u8; 1]