pub enum ItemKind<'a> {
Pos(u64),
Neg(u64),
Float(f64),
Str(StringIter<'a>),
Bytes(BytesIter<'a>),
Bool(bool),
Null,
Undefined,
Simple(u8),
Array(ArrayIter<'a>),
Dict(DictIter<'a>),
}
Expand description
Low-level encoding of a CBOR item. Use CborValue
for inspecting values.
You can obtain this representation from Cbor::kind
or
TaggedItem::kind
.
Beware of the Neg
variant, which carries -1 - x
.
Variants§
Pos(u64)
Neg(u64)
Float(f64)
Str(StringIter<'a>)
Bytes(BytesIter<'a>)
Bool(bool)
Null
Undefined
Simple(u8)
Array(ArrayIter<'a>)
Dict(DictIter<'a>)
Implementations§
Trait Implementations§
source§impl<'a> From<ItemKind<'a>> for ItemKindShort
impl<'a> From<ItemKind<'a>> for ItemKindShort
source§impl<'a> PartialEq for ItemKind<'a>
impl<'a> PartialEq for ItemKind<'a>
source§impl<'a> PartialOrd for ItemKind<'a>
impl<'a> PartialOrd for ItemKind<'a>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a> Copy for ItemKind<'a>
impl<'a> StructuralPartialEq for ItemKind<'a>
Auto Trait Implementations§
impl<'a> Freeze for ItemKind<'a>
impl<'a> RefUnwindSafe for ItemKind<'a>
impl<'a> Send for ItemKind<'a>
impl<'a> Sync for ItemKind<'a>
impl<'a> Unpin for ItemKind<'a>
impl<'a> UnwindSafe for ItemKind<'a>
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