Trait pnet::util::Octets

source ·
pub trait Octets {
    type Output;

    // Required method
    fn octets(&self) -> Self::Output;
}
Expand description

Convert a value to a byte array.

Required Associated Types§

source

type Output

Output type - bytes array.

Required Methods§

source

fn octets(&self) -> Self::Output

Return a value as bytes (big-endian order).

Implementations on Foreign Types§

source§

impl Octets for u8

§

type Output = [u8; 1]

source§

fn octets(&self) -> <u8 as Octets>::Output

source§

impl Octets for u16

§

type Output = [u8; 2]

source§

fn octets(&self) -> <u16 as Octets>::Output

source§

impl Octets for u32

§

type Output = [u8; 4]

source§

fn octets(&self) -> <u32 as Octets>::Output

source§

impl Octets for u64

§

type Output = [u8; 8]

source§

fn octets(&self) -> <u64 as Octets>::Output

Implementors§