Trait netsim_embed::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]

pub fn octets(&self) -> <u64 as Octets>::Output[src]

impl Octets for u32[src]

type Output = [u8; 4]

pub fn octets(&self) -> <u32 as Octets>::Output[src]

impl Octets for u16[src]

type Output = [u8; 2]

pub fn octets(&self) -> <u16 as Octets>::Output[src]

impl Octets for u8[src]

type Output = [u8; 1]

pub fn octets(&self) -> <u8 as Octets>::Output[src]

Implementors