pub trait ToBytes {
// Required method
fn to_bytes(&self, buf: &mut impl WritableBuffer);
}
Expand description
Allows a type to be converted to bytes and appended to a WriteableBuffer
Required Methods§
Sourcefn to_bytes(&self, buf: &mut impl WritableBuffer)
fn to_bytes(&self, buf: &mut impl WritableBuffer)
Converts a type into bytes and appends it to the buffer.
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.