pub trait BinarySerializer {
// Required methods
fn to_bytes<T: Clone>(
&self,
config: Option<&mut SerializerConfig<T>>,
) -> Result<Vec<u8>, SerializationError>;
fn write_bytes<T: Clone>(
&self,
buffer: &mut Vec<u8>,
config: Option<&mut SerializerConfig<T>>,
) -> Result<(), SerializationError>;
}Required Methods§
fn to_bytes<T: Clone>( &self, config: Option<&mut SerializerConfig<T>>, ) -> Result<Vec<u8>, SerializationError>
fn write_bytes<T: Clone>( &self, buffer: &mut Vec<u8>, config: Option<&mut SerializerConfig<T>>, ) -> Result<(), SerializationError>
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.