Trait CoseSerializable

Source
pub trait CoseSerializable {
    // Required methods
    fn to_cose(&self) -> Vec<u8> ;
    fn from_cose(bytes: &[u8]) -> Result<Self, EncodingError>
       where Self: Sized;
}
Expand description

Trait for structs that are serializable to COSE objects.

Required Methods§

Source

fn to_cose(&self) -> Vec<u8>

Serializes the struct to COSE serialization

Source

fn from_cose(bytes: &[u8]) -> Result<Self, EncodingError>
where Self: Sized,

Deserializes a serialized COSE object to a struct

Implementors§