pub trait TlsSerializeTrait: Size {
    fn tls_serialize<W>(&self, writer: &mut W) -> Result<usize, Error>
    where
        W: Write
; fn tls_serialize_detached(&self) -> Result<Vec<u8, Global>, 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

Serialize self and write it to the writer. The function returns the number of bytes written to writer.

Provided Methods

Serialize self and return it as a byte vector.

Implementations on Foreign Types

Implementors