pub trait SerializerAdapter<D> {
type Error: Error;
// Required methods
fn output_encoding() -> RepresentationIdentifier;
fn to_bytes(value: &D) -> Result<Bytes, Self::Error>;
}
Expand description
trait for connecting a Serializer implementation and DataWriter together - no_key version.
This is much simpler that the Deserializer above, because any the starting point is an application-defined type, than can be generated by any means.
Required Associated Types§
Required Methods§
fn output_encoding() -> RepresentationIdentifier
fn to_bytes(value: &D) -> Result<Bytes, Self::Error>
Object Safety§
This trait is not object safe.