pub struct Bytes(_);Expand description
A CBOR byte string.
Implementations§
source§impl Bytes
impl Bytes
sourcepub fn from_data<T>(data: T) -> Byteswhere
T: AsRef<[u8]>,
pub fn from_data<T>(data: T) -> Byteswhere T: AsRef<[u8]>,
Creates a new CBOR byte string from the provided data.
Trait Implementations§
source§impl CBORDecodable for Bytes
impl CBORDecodable for Bytes
source§fn from_cbor(cbor: &CBOR) -> Result<Box<Self>, DecodeError>
fn from_cbor(cbor: &CBOR) -> Result<Box<Self>, DecodeError>
Creates an instance of this type from CBOR symbolic representation.
source§fn 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.