Trait 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

Source§

type Output = [u8; 1]

Source§

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

Source§

impl Octets for u16

Source§

type Output = [u8; 2]

Source§

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

Source§

impl Octets for u32

Source§

type Output = [u8; 4]

Source§

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

Source§

impl Octets for u64

Source§

type Output = [u8; 8]

Source§

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

Implementors§