Trait coset::AsCborValue

source ·
pub trait AsCborValue: Sized {
    // Required methods
    fn from_cbor_value(value: Value) -> Result<Self>;
    fn to_cbor_value(self) -> Result<Value>;
}
Expand description

Trait for types that can be converted to/from a Value.

Required Methods§

source

fn from_cbor_value(value: Value) -> Result<Self>

Convert a Value into an instance of the type.

source

fn to_cbor_value(self) -> Result<Value>

Convert the object into a Value, consuming it along the way.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AsCborValue for Value

Trivial implementation of AsCborValue for Value.

Implementors§