pub trait Encodable: Sized {
// Required method
fn encode(&self, writer: &mut TdfWriter);
// Provided method
fn encode_bytes(&self) -> Vec<u8> ⓘ { ... }
}Expand description
Trait for something that can be encoded onto a TdfWriter
Required Methods§
Provided Methods§
Sourcefn encode_bytes(&self) -> Vec<u8> ⓘ
fn encode_bytes(&self) -> Vec<u8> ⓘ
Shortcut function for encoding self directly to a Vec of bytes
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<C> Encodable for Vec<C>
Vec List encoding for encodable items items are required
to have the ValueType trait in order to write the list header
impl<C> Encodable for Vec<C>
Vec List encoding for encodable items items are required to have the ValueType trait in order to write the list header