pub enum NnsGovernanceError {
UnsupportedNetwork {
network: String,
},
InvalidSourceSelection {
reason: String,
},
SourceEvidenceMismatch {
reason: String,
},
AgentBuild {
endpoint: String,
reason: String,
},
AgentCall {
method: &'static str,
reason: String,
},
InterCanisterCall {
method: &'static str,
reason: String,
},
InterCanisterCallRejected {
method: &'static str,
reject_code: u32,
message: String,
},
CandidEncode {
message: &'static str,
reason: String,
},
CandidDecode {
message: &'static str,
reason: String,
},
ResponseTooLarge {
method: &'static str,
actual_bytes: usize,
maximum_bytes: usize,
},
Governance {
error_type: i32,
message: String,
},
InvalidMetrics {
field: &'static str,
key: u64,
value: f64,
},
}Expand description
NnsGovernanceError
Portable failure returned while collecting or assembling a Governance report.
Variants§
UnsupportedNetwork
The requested network is not the supported mainnet identity.
InvalidSourceSelection
The selected transport cannot be executed by the source adapter.
SourceEvidenceMismatch
Returned provenance did not match the requested transport.
AgentBuild
Native IC agent setup failed.
AgentCall
A native IC agent query failed.
InterCanisterCall
A replicated inter-canister call could not be submitted.
Fields
InterCanisterCallRejected
A replicated inter-canister call returned an IC reject.
Fields
CandidEncode
A Candid request could not be encoded.
CandidDecode
A Candid response could not be decoded.
ResponseTooLarge
A response exceeded the library’s explicit raw-response byte bound.
Fields
Governance
Governance returned its typed application-level error.
InvalidMetrics
Governance returned a non-finite metric that JSON cannot preserve.
Trait Implementations§
Source§impl Debug for NnsGovernanceError
impl Debug for NnsGovernanceError
Source§impl Display for NnsGovernanceError
impl Display for NnsGovernanceError
Source§impl Error for NnsGovernanceError
impl Error for NnsGovernanceError
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<NnsGovernanceError> for NnsNeuronError
impl From<NnsGovernanceError> for NnsNeuronError
Source§fn from(source: NnsGovernanceError) -> Self
fn from(source: NnsGovernanceError) -> Self
Converts to this type from the input type.
Source§impl From<NnsGovernanceError> for NnsProposalError
impl From<NnsGovernanceError> for NnsProposalError
Source§fn from(source: NnsGovernanceError) -> Self
fn from(source: NnsGovernanceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NnsGovernanceError
impl RefUnwindSafe for NnsGovernanceError
impl Send for NnsGovernanceError
impl Sync for NnsGovernanceError
impl Unpin for NnsGovernanceError
impl UnsafeUnpin for NnsGovernanceError
impl UnwindSafe for NnsGovernanceError
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