[−][src]Trait lazy_bytes_cast::to::ToBytesCast
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>
Converts to bytes.
fn copy_to_bytes(&self, to: &mut [u8]) -> Result<(), ()>
Writes into byte slice.
unsafe fn copy_to_bytes_lazy(&self, to: &mut [u8])
Unsafe version of copy_to_bytes