pub trait SerializeBytes: Size {
    // Required method
    fn tls_serialize(&self) -> Result<Vec<u8>, Error>;
}
Expand description

The SerializeBytes trait provides a function to serialize a struct or enum.

The trait provides one function:

  • tls_serialize that returns a byte vector

Required Methods§

fn tls_serialize(&self) -> Result<Vec<u8>, Error>

Serialize self and return it as a byte vector.

Implementations on Foreign Types§

§

impl SerializeBytes for &u8

§

impl SerializeBytes for &u16

§

impl SerializeBytes for &u32

§

impl SerializeBytes for &u64

§

impl SerializeBytes for u8

§

impl SerializeBytes for u16

§

impl SerializeBytes for u32

§

impl SerializeBytes for u64

§

impl<T> SerializeBytes for &Option<T>
where T: SerializeBytes,

§

impl<T> SerializeBytes for &[T]
where T: SerializeBytes,

§

impl<T> SerializeBytes for &Vec<T>
where T: SerializeBytes,

§

impl<T> SerializeBytes for Option<T>
where T: SerializeBytes,

§

impl<T> SerializeBytes for Vec<T>
where T: SerializeBytes,

§

impl<T> SerializeBytes for PhantomData<T>

§

impl<const LEN: usize> SerializeBytes for [u8; LEN]

Implementors§