Trait dcbor::CBORTaggedEncodable
source · pub trait CBORTaggedEncodable: CBOREncodable + CBORTagged {
// Required method
fn untagged_cbor(&self) -> CBOR;
// Provided methods
fn tagged_cbor(&self) -> CBOR { ... }
fn tagged_cbor_data(&self) -> Vec<u8> ⓘ { ... }
}Expand description
A type that can be encoded to CBOR with a specific tag.
Typically types that implement this trait will only provide the CBOR_TAG
associated constant and implement the untagged_cbor function.
Required Methods§
sourcefn untagged_cbor(&self) -> CBOR
fn untagged_cbor(&self) -> CBOR
Returns the untagged CBOR encoding of this instance.
Provided Methods§
sourcefn tagged_cbor(&self) -> CBOR
fn tagged_cbor(&self) -> CBOR
Returns the tagged CBOR encoding of this instance.
sourcefn tagged_cbor_data(&self) -> Vec<u8> ⓘ
fn tagged_cbor_data(&self) -> Vec<u8> ⓘ
Returns the tagged value in CBOR binary representation.
Object Safety§
This trait is not object safe.