pub struct Any { /* private fields */ }Expand description
A streaming decoder for any CBOR item.
as opposed to crate::Any, this type is designed to handle fragmented chunks through the
feed method, but does not implement Encode/Decode/CborLen.
Implementations§
Source§impl Any
impl Any
Sourcepub fn feed(
&mut self,
chunk: &mut Decoder<'_>,
) -> Result<(), Error<InvalidUtf8>>
pub fn feed( &mut self, chunk: &mut Decoder<'_>, ) -> Result<(), Error<InvalidUtf8>>
Ingest a chunk of data.
If the chunk completes a full CBOR item, returns Ok(()) and the remaining unprocessed data is
left in the chunk. Otherwise, returns crate::primitive::Error::EndOfInput (wrapped in
crate::container::Error::Malformed) to indicate that more data is needed. Any other error
variant indicates a malformed input.
Trait Implementations§
Source§impl Ord for Any
impl Ord for Any
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Any
impl PartialOrd for Any
impl Eq for Any
impl StructuralPartialEq for Any
Auto Trait Implementations§
impl Freeze for Any
impl RefUnwindSafe for Any
impl Send for Any
impl Sync for Any
impl Unpin for Any
impl UnsafeUnpin for Any
impl UnwindSafe for Any
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