pub struct NnsProposalCollectionState { /* private fields */ }Expand description
NnsProposalCollectionState
Serializable continuation state for an explicitly bounded proposal walk.
Implementations§
Source§impl NnsProposalCollectionState
impl NnsProposalCollectionState
Sourcepub fn new(
request: &NnsGovernanceRequest,
page_size: u32,
max_pages: u32,
) -> Result<Self, NnsProposalError>
pub fn new( request: &NnsGovernanceRequest, page_size: u32, max_pages: u32, ) -> Result<Self, NnsProposalError>
Start an empty proposal walk with explicit per-page and cumulative call ceilings.
Sourcepub const fn schema_version(&self) -> u32
pub const fn schema_version(&self) -> u32
Return the state schema version.
Sourcepub fn governance_canister_id(&self) -> &str
pub fn governance_canister_id(&self) -> &str
Return the fixed Governance canister identity.
Sourcepub const fn requested_source(&self) -> &NnsGovernanceSourceSelection
pub const fn requested_source(&self) -> &NnsGovernanceSourceSelection
Return the source selection fixed when collection started.
Sourcepub const fn source(&self) -> Option<&NnsGovernanceSourceProvenance>
pub const fn source(&self) -> Option<&NnsGovernanceSourceProvenance>
Return the concrete source provenance after the first admitted page.
Sourcepub const fn page_size(&self) -> u32
pub const fn page_size(&self) -> u32
Return the maximum rows requested from each Governance call.
Sourcepub const fn pages_fetched(&self) -> u32
pub const fn pages_fetched(&self) -> u32
Return the number of successfully admitted pages.
Sourcepub const fn proposals_fetched(&self) -> u64
pub const fn proposals_fetched(&self) -> u64
Return the number of successfully admitted proposal rows.
Sourcepub const fn next_before_proposal_id(&self) -> Option<u64>
pub const fn next_before_proposal_id(&self) -> Option<u64>
Return the exclusive cursor for the next page, when one remains.
Sourcepub fn started_at(&self) -> &str
pub fn started_at(&self) -> &str
Return the caller-supplied time at which the collection state was created.
Sourcepub fn updated_at(&self) -> &str
pub fn updated_at(&self) -> &str
Return the caller-supplied time attached to the latest admitted page.
Sourcepub const fn status(&self) -> NnsProposalCollectionStatus
pub const fn status(&self) -> NnsProposalCollectionStatus
Return the collection lifecycle status.
Sourcepub const fn is_complete(&self) -> bool
pub const fn is_complete(&self) -> bool
Return whether Governance API exhaustion was observed.
Trait Implementations§
Source§impl Clone for NnsProposalCollectionState
impl Clone for NnsProposalCollectionState
Source§fn clone(&self) -> NnsProposalCollectionState
fn clone(&self) -> NnsProposalCollectionState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more