binary_mirror

Trait ToBytes

Source
pub trait ToBytes {
    // Required method
    fn to_bytes(&self) -> &[u8] ;

    // Provided method
    fn to_bytes_owned(&self) -> Vec<u8> { ... }
}

Required Methods§

Source

fn to_bytes(&self) -> &[u8]

Convert the struct to its binary representation

Provided Methods§

Source

fn to_bytes_owned(&self) -> Vec<u8>

Convert the struct to an owned Vec

Implementors§