Trait dcbor::CBOREncodable

source ·
pub trait CBOREncodable {
    // Required methods
    fn cbor(&self) -> CBOR;
    fn cbor_data(&self) -> Vec<u8>;
}
Expand description

A type that can be encoded as CBOR.

Required Methods§

source

fn cbor(&self) -> CBOR

Returns the value in CBOR symbolic representation.

source

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

Returns the value in CBOR binary representation.

Implementations on Foreign Types§

source§

impl CBOREncodable for f16

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for &str

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for String

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl<T, const N: usize> CBOREncodable for [T; N]where T: CBOREncodable,

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for u8

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for f32

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for u32

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for i16

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for u64

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for i32

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl<T, const N: usize> CBOREncodable for &[T; N]where T: CBOREncodable,

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for u16

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for Vec<Box<dyn CBOREncodable>>

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for i64

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for bool

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl<T> CBOREncodable for Vec<T>where T: CBOREncodable,

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for i8

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for usize

source§

fn cbor(&self) -> CBOR

source§

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

source§

impl CBOREncodable for f64

source§

fn cbor(&self) -> CBOR

source§

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

Implementors§