pub enum IcrcError {
AgentBuild {
endpoint: String,
reason: String,
},
InvalidPrincipal {
field: &'static str,
reason: String,
},
InvalidSubaccountHex {
reason: String,
},
InvalidSubaccountLength {
bytes: usize,
},
InvalidTransactionPage {
reason: String,
},
CandidEncode {
message: &'static str,
reason: String,
},
AgentCall {
method: &'static str,
reason: String,
},
CandidDecode {
message: &'static str,
reason: String,
},
}Expand description
IcrcError
Error surfaced by generic ICRC validation, report building, and live calls.
Variants§
AgentBuild
The selected endpoint could not construct a replica agent.
InvalidPrincipal
A supplied principal field could not be parsed.
Fields
InvalidSubaccountHex
The supplied subaccount is not valid hexadecimal.
InvalidSubaccountLength
The decoded subaccount does not contain exactly 32 bytes.
InvalidTransactionPage
Ledger or archive evidence violates the requested page bounds or callback provenance.
CandidEncode
The typed Candid request could not be encoded.
Fields
AgentCall
The read-only replica query failed.
Fields
CandidDecode
The response violates its typed Candid contract or decoder budget.
Trait Implementations§
Source§impl Error for IcrcError
impl Error for IcrcError
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()
Auto Trait Implementations§
impl Freeze for IcrcError
impl RefUnwindSafe for IcrcError
impl Send for IcrcError
impl Sync for IcrcError
impl Unpin for IcrcError
impl UnsafeUnpin for IcrcError
impl UnwindSafe for IcrcError
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