pub enum DocumentError {
TooLarge {
actual: usize,
maximum: usize,
},
TooDeep {
maximum: usize,
},
TooManyNodes {
maximum: usize,
},
LengthOverflow,
Invalid {
reason: &'static str,
},
UnsupportedVersion {
found: u16,
supported: u16,
},
ChecksumMismatch,
DigestMismatch,
InvalidUtf8,
}Expand description
Failure while encoding or verifying one canonical structured document.
Variants§
TooLarge
Canonical payload exceeds the hard bound.
TooDeep
Array/object nesting exceeds the hard bound.
TooManyNodes
Value count exceeds the hard bound.
LengthOverflow
Length cannot be represented by the canonical format.
Invalid
Encoded bytes are truncated or structurally noncanonical.
UnsupportedVersion
Document format is newer than this binary.
ChecksumMismatch
Fast accidental-corruption check failed.
DigestMismatch
Canonical content digest failed.
InvalidUtf8
A string or object key is not UTF-8.
Trait Implementations§
Source§impl Clone for DocumentError
impl Clone for DocumentError
Source§fn clone(&self) -> DocumentError
fn clone(&self) -> DocumentError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentError
impl Debug for DocumentError
Source§impl Display for DocumentError
impl Display for DocumentError
impl Eq for DocumentError
Source§impl Error for DocumentError
impl Error for DocumentError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<DocumentError> for EngineError
impl From<DocumentError> for EngineError
Source§fn from(source: DocumentError) -> Self
fn from(source: DocumentError) -> Self
Converts to this type from the input type.
Source§impl From<DocumentError> for ProofError
impl From<DocumentError> for ProofError
Source§fn from(source: DocumentError) -> Self
fn from(source: DocumentError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DocumentError
impl PartialEq for DocumentError
impl StructuralPartialEq for DocumentError
Auto Trait Implementations§
impl Freeze for DocumentError
impl RefUnwindSafe for DocumentError
impl Send for DocumentError
impl Sync for DocumentError
impl Unpin for DocumentError
impl UnsafeUnpin for DocumentError
impl UnwindSafe for DocumentError
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