Trait lazy_bytes_cast::to::ToBytesCast [] [src]

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

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

Converts to bytes.

Writes into byte slice.

Unsafe version of copy_to_bytes

Implementors