#[non_exhaustive]pub enum JcsError {
UnsafeInteger(String),
NonFinite,
TooDeep(usize),
}Expand description
Canonicalization failures.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnsafeInteger(String)
Integer outside the exactly-representable double range.
NonFinite
Non-finite number (unreachable via serde_json::Value, kept for defense).
TooDeep(usize)
Round-40 F5: value nesting exceeds MAX_NESTED_DEPTH.
Current call sites all feed canonicalize a Value that was
parsed by serde_json::from_slice (default recursion limit
128), or serialized from a typed struct with bounded depth,
so this cap is transitively already enforced. The cap here is
defense-in-depth against a future caller that pipes an
unbounded-parsed Value (e.g. serde_json::Deserializer:: disable_recursion_limit) or a merged deep tree — without
this bound, write_value would recurse until the OS stack
overflows.
Trait Implementations§
Source§impl Error for JcsError
impl Error for JcsError
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<JcsError> for ReceiptError
impl From<JcsError> for ReceiptError
impl Eq for JcsError
impl StructuralPartialEq for JcsError
Auto Trait Implementations§
impl Freeze for JcsError
impl RefUnwindSafe for JcsError
impl Send for JcsError
impl Sync for JcsError
impl Unpin for JcsError
impl UnsafeUnpin for JcsError
impl UnwindSafe for JcsError
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
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.