Trait hpke::Serializable

source ·
pub trait Serializable {
    type OutputSize: ArrayLength<u8>;

    // Required method
    fn to_bytes(&self) -> GenericArray<u8, Self::OutputSize>;

    // Provided method
    fn size() -> usize { ... }
}
Expand description

Implemented by types that have a fixed-length byte representation

Required Associated Types§

Required Methods§

Provided Methods§

source

fn size() -> usize

Returns the size (in bytes) of this type when serialized

Object Safety§

This trait is not object safe.

Implementors§