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§
sourcefn from_cbor_value(value: Value) -> Result<Self>
fn from_cbor_value(value: Value) -> Result<Self>
Convert a [Value
] into an instance of the type.
sourcefn to_cbor_value(self) -> Result<Value>
fn to_cbor_value(self) -> Result<Value>
Convert the object into a [Value
], consuming it along the way.
Implementations on Foreign Types§
source§impl AsCborValue for Value
impl AsCborValue for Value
Trivial implementation of AsCborValue
for [Value
].