pub trait Serialize {
    type Error: Error + From<Error>;

    fn serialize<W: Write>(&self, writer: W) -> Result<(), Self::Error>;

    fn serialize_as_vec(&self) -> Result<Vec<u8>, Self::Error> { ... }
}
Expand description

Define that an object can be written to a Write object.

Required Associated Types

Required Methods

Provided Methods

Convenience method to serialize into a byte vector.

Implementations on Foreign Types

Implementors