Trait libpacket::util::Octets[][src]

pub trait Octets {
    type Output;
    fn octets(&self) -> Self::Output;
}
Expand description

Convert a value to a byte array.

Associated Types

type Output[src]

Output type - bytes array.

Required methods

fn octets(&self) -> Self::Output[src]

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

Implementations on Foreign Types

impl Octets for u64[src]

type Output = [u8; 8]

fn octets(&self) -> Self::Output[src]

impl Octets for u32[src]

type Output = [u8; 4]

fn octets(&self) -> Self::Output[src]

impl Octets for u16[src]

type Output = [u8; 2]

fn octets(&self) -> Self::Output[src]

impl Octets for u8[src]

type Output = [u8; 1]

fn octets(&self) -> Self::Output[src]

Implementors