ToBeBytes

Trait ToBeBytes 

Source
pub trait ToBeBytes {
    type ByteArray: AsRef<[u8]>;

    // Required methods
    fn written_len(&self) -> usize;
    fn to_be_bytes(&self) -> Self::ByteArray;
}

Required Associated Types§

Required Methods§

Source

fn written_len(&self) -> usize

Length when written to big endian bytes.

Source

fn to_be_bytes(&self) -> Self::ByteArray

Implementations on Foreign Types§

Source§

impl ToBeBytes for u8

Source§

impl ToBeBytes for u16

Source§

impl ToBeBytes for u32

Source§

impl ToBeBytes for u64

Source§

impl ToBeBytes for ()

Implementors§

Source§

impl ToBeBytes for F32

Source§

impl ToBeBytes for F32Pair

Source§

impl ToBeBytes for F32Triplet

Source§

impl ToBeBytes for F64

Source§

impl ToBeBytes for F64Pair

Source§

impl ToBeBytes for F64Triplet

Source§

impl ToBeBytes for I8

Source§

impl ToBeBytes for I8Pair

Source§

impl ToBeBytes for I8Triplet

Source§

impl ToBeBytes for I16

Source§

impl ToBeBytes for I16Pair

Source§

impl ToBeBytes for I16Triplet

Source§

impl ToBeBytes for I32

Source§

impl ToBeBytes for I32Pair

Source§

impl ToBeBytes for I32Triplet

Source§

impl ToBeBytes for I64

Source§

impl ToBeBytes for I64Pair

Source§

impl ToBeBytes for I64Triplet

Source§

impl ToBeBytes for U8

Source§

impl ToBeBytes for U8Pair

Source§

impl ToBeBytes for U8Triplet

Source§

impl ToBeBytes for U16

Source§

impl ToBeBytes for U16Pair

Source§

impl ToBeBytes for U16Triplet

Source§

impl ToBeBytes for U32

Source§

impl ToBeBytes for U32Pair

Source§

impl ToBeBytes for U32Triplet

Source§

impl ToBeBytes for U64

Source§

impl ToBeBytes for U64Pair

Source§

impl ToBeBytes for U64Triplet