pub enum CborError {
Show 16 variants
Truncated(usize),
Trailing(usize),
NonCanonicalArgument {
argument: u64,
width: usize,
},
IndefiniteLength,
ReservedArgument(u8),
Float,
Simple(u8),
IntegerRange(u64),
NotUtf8,
Tag(u64),
LinkNotBytes,
LinkPrefix,
Link(CidError),
KeyNotText,
KeyOrder {
found: String,
previous: String,
},
TooDeep,
}Expand description
Why a block is not a value in this data model.
Variants§
Truncated(usize)
The block ended in the middle of a value.
Trailing(usize)
A value was complete and bytes followed it. A block is one value.
NonCanonicalArgument
An argument written in a wider form than the shortest that holds it.
IndefiniteLength
One of the indefinite-length forms, which DAG-CBOR does not have.
ReservedArgument(u8)
A reserved additional-information value: 28, 29 or 30.
Float
A float, of any width. The data model has no float; see Value.
Simple(u8)
A simple value other than false, true and null.
IntegerRange(u64)
An integer past what an i64 holds, which the data model’s one number
type cannot carry.
NotUtf8
A text string, or a map key, that is not UTF-8.
Tag(u64)
A tag other than 42.
LinkNotBytes
Tag 42 over something that is not a byte string.
LinkPrefix
A link’s byte string without the identity multibase prefix.
Link(CidError)
A link whose bytes are not a CID this crate can re-encode.
KeyNotText
A map key that is not a text string.
KeyOrder
Map keys out of order, which includes a repeated key.
TooDeep
More nesting than MAX_DEPTH.
Trait Implementations§
Source§impl Error for CborError
impl Error for CborError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl Eq for CborError
impl StructuralPartialEq for CborError
Auto Trait Implementations§
impl Freeze for CborError
impl RefUnwindSafe for CborError
impl Send for CborError
impl Sync for CborError
impl Unpin for CborError
impl UnsafeUnpin for CborError
impl UnwindSafe for CborError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.