Trait dcbor::CBORDecodable
source · pub trait CBORDecodable {
// Required method
fn from_cbor(cbor: &CBOR) -> Result<Box<Self>, DecodeError>;
// Provided method
fn from_cbor_data(cbor_data: &[u8]) -> Result<Box<Self>, DecodeError> { ... }
}Expand description
A type that can be decoded from CBOR.
Required Methods§
Provided Methods§
sourcefn from_cbor_data(cbor_data: &[u8]) -> Result<Box<Self>, DecodeError>
fn from_cbor_data(cbor_data: &[u8]) -> Result<Box<Self>, DecodeError>
Creates an instance of this type from encoded CBOR binary data.