Trait dcbor::CBORTaggedEncodable
source · pub trait CBORTaggedEncodable: CBOREncodable {
const CBOR_TAG: Tag;
// Required method
fn untagged_cbor(&self) -> CBOR;
// Provided method
fn tagged_cbor(&self) -> CBOR { ... }
}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 Associated Constants§
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.