pub trait SerWrite {
type Error;
// Required method
fn write(&mut self, buf: &[u8]) -> Result<(), Self::Error>;
// Provided methods
fn write_byte(&mut self, byte: u8) -> Result<(), Self::Error> { ... }
fn write_str(&mut self, s: &str) -> Result<(), Self::Error> { ... }
}Expand description
Serializers should write data to the implementations of this trait.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".