Trait lazy_bytes_cast::ToBytesCast [] [src]

pub unsafe trait ToBytesCast: Copy {
    fn to_bytes(&self) -> Vec<u8>;
    fn copy_to_bytes(&self, to: &mut [u8]) -> Result<()()>;
}

Trait to provide to_bytes method for a arbitrary data.

This trait is implemented for a basic integer that can be safely converted.

Required Methods

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

fn copy_to_bytes(&self, to: &mut [u8]) -> Result<()()>

Implementors