Trait tls_codec::Serialize[][src]

pub trait Serialize: TlsSize {
    fn tls_serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>;

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

The Serialize trait provides functions to serialize a struct or enum.

The trait provides two functions:

  • tls_serialize that takes a buffer to write the serialization to
  • tls_serialize_detached that returns a byte vector

Required methods

Provided methods

Implementations on Foreign Types

Implementors