[−][src]Enum cbor_diag::DataItem
A CBOR data item.
Variants
An unsigned integer.
Fields of Integer
value: u64
The value of this unsigned integer.
bitwidth: IntegerWidth
The bitwidth used for encoding this integer.
A negative integer.
Fields of Negative
value: u64
The encoded value of this negative integer, the real value is -1 - value
(requires use of i128
for full range support).
bitwidth: IntegerWidth
The bitwidth used for encoding this integer.
ByteString(ByteString)
A string of raw bytes with no direct attached meaning.
See the docs for ByteString
for more details.
TextString(TextString)
A UTF-8 encoded text string.
See the docs for TextString
for more details.
IndefiniteByteString(Vec<ByteString>)
A series of ByteString
chunks encoded as an indefinite length byte
string.
See RFC 7049 § 2.2.2.
IndefiniteTextString(Vec<TextString>)
A series of TextString
chunks encoded as an indefinite length text
string.
See RFC 7049 § 2.2.2.
An array of data items.
Fields of Array
data: Vec<DataItem>
The data items in this array.
bitwidth: Option<IntegerWidth>
The bitwidth used for encoding the array length.
If has the value None
then this array is encoded using the
indefinite length form, see RFC 7049 § 2.2.1.
A map of pairs of data items.
Fields of Map
data: Vec<(DataItem, DataItem)>
The pairs of data items in this map.
bitwidth: Option<IntegerWidth>
The bitwidth used for encoding the map length.
If has the value None
then this map is encoded using the
indefinite length form, see RFC 7049 § 2.2.1.
Semantic tagging of another data item.
See the docs for Tag
for more details.
Fields of Tag
tag: Tag
The semantic tag to be applied to value
.
bitwidth: IntegerWidth
The bitwidth used to encode the semantic tag.
value: Box<DataItem>
The data item which has the semantic tag applied to it.
A floating point value.
See RFC 7049 § 2.3.
Fields of Float
Simple(Simple)
A "simple value" data item.
See the docs for Simple
for more details.
Implementations
impl DataItem
[src]
impl DataItem
[src]
impl DataItem
[src]
Trait Implementations
impl Clone for DataItem
[src]
impl Debug for DataItem
[src]
impl PartialEq<DataItem> for DataItem
[src]
impl StructuralPartialEq for DataItem
[src]
Auto Trait Implementations
impl RefUnwindSafe for DataItem
impl Send for DataItem
impl Sync for DataItem
impl Unpin for DataItem
impl UnwindSafe for DataItem
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,