pub enum NnsProposalError {
Show 16 variants
Governance(NnsGovernanceError),
InvalidLimit {
limit: u32,
maximum: u32,
},
PageTooLarge {
actual: usize,
requested: u32,
},
MissingProposalIdInPage,
InvalidProposalIdInPage,
DuplicateProposalId {
proposal_id: u64,
},
ProposalCursorMismatch {
proposal_id: u64,
before_proposal_id: u64,
},
ProposalNotFound {
proposal_id: u64,
},
ProposalIdMismatch {
expected: u64,
actual: Option<u64>,
},
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
NnsProposalError
Portable failure returned while collecting or assembling proposal reports.
Variants§
Governance(NnsGovernanceError)
Shared Governance request, transport, or provenance validation failed.
InvalidLimit
The requested page size is outside the bounded proposal contract.
PageTooLarge
Governance returned more proposal rows than requested.
MissingProposalIdInPage
A proposal page row did not include its required identifier.
InvalidProposalIdInPage
A proposal page used the reserved zero identifier.
DuplicateProposalId
A proposal page repeated an identifier.
ProposalCursorMismatch
A proposal did not satisfy the exclusive page cursor.
ProposalNotFound
Governance did not return the requested proposal.
ProposalIdMismatch
Governance returned a different proposal than requested.
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 NnsProposalError
impl Debug for NnsProposalError
Source§impl Display for NnsProposalError
impl Display for NnsProposalError
Source§impl Error for NnsProposalError
impl Error for NnsProposalError
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()