pub struct Ciborium;
Available on crate feature
serde
only.Expand description
CBOR codec using ciborium.
ยงCompatibility
This codec is able to decode values encoded with Cbor
but the opposite is not true.
Make sure you are not mixing this codec with the legacy Cbor
codec across your remote endpoints to avoid deserialization errors.
More information is provided in the ciborium
README.
Trait Implementationsยง
sourceยงimpl Codec for Ciborium
impl Codec for Ciborium
sourceยงfn serialize<Writer, Item>(
writer: Writer,
item: &Item,
) -> Result<(), SerializationError>
fn serialize<Writer, Item>( writer: Writer, item: &Item, ) -> Result<(), SerializationError>
Serializes the specified item into the data format.
sourceยงfn deserialize<Reader, Item>(
reader: Reader,
) -> Result<Item, DeserializationError>where
Reader: Read,
Item: DeserializeOwned,
fn deserialize<Reader, Item>(
reader: Reader,
) -> Result<Item, DeserializationError>where
Reader: Read,
Item: DeserializeOwned,
Deserializes the specified data into an item.
sourceยงimpl<'de> Deserialize<'de> for Ciborium
impl<'de> Deserialize<'de> for Ciborium
sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementationsยง
impl Freeze for Ciborium
impl RefUnwindSafe for Ciborium
impl Send for Ciborium
impl Sync for Ciborium
impl Unpin for Ciborium
impl UnwindSafe for Ciborium
Blanket Implementationsยง
sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
sourceยงdefault unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit
)