pub trait ToBytes: Sized {
// Required method
fn to_le_bytes(&self) -> &[u8] ⓘ;
}Expand description
A trait for types that can be converted to a little-endian byte slice
Required Methods§
Sourcefn to_le_bytes(&self) -> &[u8] ⓘ
fn to_le_bytes(&self) -> &[u8] ⓘ
Returns a slice of this type’s bytes in little-endian order
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.