FromCbor

Trait FromCbor 

Source
pub trait FromCbor<'d> {
    // Required method
    fn from_cbor(bytes: &'d [u8]) -> Result<Self, Error>
       where Self: Sized;
}
Expand description

A trait mostly for convenience, as we often end up writing bytes to CBOR.

Required Methods§

Source

fn from_cbor(bytes: &'d [u8]) -> Result<Self, Error>
where Self: Sized,

Implementors§

Source§

impl<'d, T: Decode<'d, ()>> FromCbor<'d> for T