Trait ToBytes

Source
pub trait ToBytes {
    // Required method
    fn to_bytes(&self) -> Vec<u8> ;
}
Expand description

Trait to convert types to byte vectors.

Required Methods§

Source

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

Converts the type to a byte vector.

Implementations on Foreign Types§

Source§

impl ToBytes for f32

Source§

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

Source§

impl ToBytes for f64

Source§

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

Source§

impl ToBytes for i32

Source§

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

Source§

impl ToBytes for i64

Source§

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

Implementors§