pub enum NnsNeuronError {
Show 13 variants
Governance(NnsGovernanceError),
InvalidPageSize {
page_size: u32,
max_page_size: u32,
},
GovernanceResponse {
error_type: i32,
message: String,
},
NeuronNotFound {
neuron_id: u64,
},
MissingNeuronId,
InvalidResponse {
reason: String,
},
InvalidCollectionMaxPages,
InvalidCollectionState {
reason: String,
},
CollectionRequestMismatch {
field: &'static str,
expected: String,
actual: String,
},
CollectionComplete {
pages_fetched: u32,
},
CollectionPageLimitReached {
pages_fetched: u32,
max_pages: u32,
},
CollectionSourceChanged {
expected: NnsGovernanceSourceProvenance,
actual: NnsGovernanceSourceProvenance,
},
CollectionAccountingOverflow,
}Expand description
NnsNeuronError
Portable failure returned while collecting or assembling neuron reports.
Variants§
Governance(NnsGovernanceError)
Shared Governance request, transport, or provenance validation failed.
InvalidPageSize
The requested page size is outside Governance’s supported range.
GovernanceResponse
Governance returned its typed application-level error.
NeuronNotFound
Governance has no publicly readable view for the requested neuron id.
MissingNeuronId
Governance returned a neuron row without its required identifier.
InvalidResponse
A source page or detail row violated the neuron contract.
InvalidCollectionMaxPages
A resumable collection was configured without any page capacity.
InvalidCollectionState
Serialized or caller-modified resumable collection state is inconsistent.
CollectionRequestMismatch
A continuation request changed an identity fixed when collection started.
Fields
CollectionComplete
A caller attempted to advance a collection that already exhausted the API.
CollectionPageLimitReached
A caller attempted to advance a collection after consuming its page budget.
Fields
CollectionSourceChanged
A later collection page was returned by a different collector.
Fields
expected: NnsGovernanceSourceProvenanceConcrete source retained from the first admitted page.
actual: NnsGovernanceSourceProvenanceConcrete source returned with the candidate page.
CollectionAccountingOverflow
Cumulative page or row accounting exceeded its integer representation.
Trait Implementations§
Source§impl Debug for NnsNeuronError
impl Debug for NnsNeuronError
Source§impl Display for NnsNeuronError
impl Display for NnsNeuronError
Source§impl Error for NnsNeuronError
impl Error for NnsNeuronError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()