pub trait Serializer {
// Required methods
fn write_u64(&mut self, value: u64);
fn write_f32(&mut self, value: f32);
fn write_bytes(&mut self, bytes: &[u8]);
}Expand description
A sink for the primitive field types the container emits.
Implement this to control the binary layout. The container calls these in a fixed order.
Required Methods§
Sourcefn write_bytes(&mut self, bytes: &[u8])
fn write_bytes(&mut self, bytes: &[u8])
Write raw bytes, such as string contents.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".