pub struct DagCborCodec;Expand description
DAG-CBOR implementation of ipld-core’s Codec trait.
Trait Implementations§
Source§impl BlockEncoded<DagCborCodec> for Manifest
impl BlockEncoded<DagCborCodec> for Manifest
Source§impl BlockEncoded<DagCborCodec> for Node
impl BlockEncoded<DagCborCodec> for Node
Source§impl Clone for DagCborCodec
impl Clone for DagCborCodec
Source§fn clone(&self) -> DagCborCodec
fn clone(&self) -> DagCborCodec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> Codec<T> for DagCborCodecwhere
T: for<'a> Deserialize<'a> + Serialize,
impl<T> Codec<T> for DagCborCodecwhere
T: for<'a> Deserialize<'a> + Serialize,
Source§type Error = CodecError
type Error = CodecError
The error that is returned if encoding or decoding fails.
Source§fn decode<R>(reader: R) -> Result<T, <DagCborCodec as Codec<T>>::Error>where
R: BufRead,
fn decode<R>(reader: R) -> Result<T, <DagCborCodec as Codec<T>>::Error>where
R: BufRead,
Decode a reader into the desired type.
Source§fn encode<W>(
writer: W,
data: &T,
) -> Result<(), <DagCborCodec as Codec<T>>::Error>where
W: Write,
fn encode<W>(
writer: W,
data: &T,
) -> Result<(), <DagCborCodec as Codec<T>>::Error>where
W: Write,
Encode a type into a writer.
Source§impl Debug for DagCborCodec
impl Debug for DagCborCodec
Source§impl Links for DagCborCodec
impl Links for DagCborCodec
Source§type LinksError = CodecError
type LinksError = CodecError
The error that is returned if the link extraction fails.
Source§fn links(
data: &[u8],
) -> Result<impl Iterator<Item = Cid<64>>, <DagCborCodec as Links>::LinksError>
fn links( data: &[u8], ) -> Result<impl Iterator<Item = Cid<64>>, <DagCborCodec as Links>::LinksError>
Return all links (CIDs) that the given encoded data contains.
Source§impl PartialEq for DagCborCodec
impl PartialEq for DagCborCodec
impl Copy for DagCborCodec
impl Eq for DagCborCodec
impl StructuralPartialEq for DagCborCodec
Auto Trait Implementations§
impl Freeze for DagCborCodec
impl RefUnwindSafe for DagCborCodec
impl Send for DagCborCodec
impl Sync for DagCborCodec
impl Unpin for DagCborCodec
impl UnwindSafe for DagCborCodec
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.