#[non_exhaustive]pub enum DecodedError {
Known {
data: Box<ErrorData>,
raw: Value,
},
Unclassified {
raw: Value,
},
}Expand description
Interpretation of a JSON-RPC error object, not the enclosing response. Raw JSON survives every classification, including malformed/framework data. Neither case authorizes automatic writes or transaction replacement.
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.
Known
Known code/family with valid method-specific evidence. Future reasons remain in the typed value and original JSON. Provenance is not verified.
Unclassified
Framework/unfamiliar/malformed data, or contradictory code/evidence. Preserve prior uncertainty and surface the original error.
Implementations§
Source§impl DecodedError
impl DecodedError
Sourcepub fn decode(method: &str, raw: Value) -> DecodedError
pub fn decode(method: &str, raw: Value) -> DecodedError
Classify an error for the invoked native method. This does not compare hashes with the request, compute signed-envelope hashes, verify chain identity, or implement recovery policy. Such checks belong to callers.
Trait Implementations§
Source§impl Clone for DecodedError
impl Clone for DecodedError
Source§fn clone(&self) -> DecodedError
fn clone(&self) -> DecodedError
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 moreAuto Trait Implementations§
impl Freeze for DecodedError
impl RefUnwindSafe for DecodedError
impl Send for DecodedError
impl Sync for DecodedError
impl Unpin for DecodedError
impl UnsafeUnpin for DecodedError
impl UnwindSafe for DecodedError
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