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§

source

const CBOR_TAG: Tag

The CBOR tag assocated with this type.

Required Methods§

source

fn untagged_cbor(&self) -> CBOR

Returns the untagged CBOR encoding of this instance.

Provided Methods§

source

fn tagged_cbor(&self) -> CBOR

Returns the tagged CBOR encoding of this instance.

Implementors§