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§

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.

source

fn tagged_cbor_data(&self) -> Vec<u8>

Returns the tagged value in CBOR binary representation.

Object Safety§

This trait is not object safe.

Implementors§