Skip to main content

ToBytes

Trait ToBytes 

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

Trait to convert to byte vec implement this to allow you struct to be used by builder

Required Methods§

Source

fn to_bytes(self) -> Vec<u8>

convert your type to bytes repersenting string of your type

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToBytes for &str

Source§

fn to_bytes(self) -> Vec<u8>

Source§

impl ToBytes for String

Source§

fn to_bytes(self) -> Vec<u8>

Implementors§