pub struct NnsNeuronCollectionState { /* private fields */ }Expand description
NnsNeuronCollectionState
Serializable continuation state for an explicitly bounded public-neuron walk.
Implementations§
Source§impl NnsNeuronCollectionState
impl NnsNeuronCollectionState
Sourcepub fn new(
request: &NnsGovernanceRequest,
page_size: u32,
max_pages: u32,
) -> Result<Self, NnsNeuronError>
pub fn new( request: &NnsGovernanceRequest, page_size: u32, max_pages: u32, ) -> Result<Self, NnsNeuronError>
Start an empty neuron 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 neurons_fetched(&self) -> usize
pub const fn neurons_fetched(&self) -> usize
Return the number of successfully admitted neuron rows.
Sourcepub const fn next_start_neuron_id(&self) -> Option<u64>
pub const fn next_start_neuron_id(&self) -> Option<u64>
Return the exclusive lower neuron-id bound for the next page.
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) -> NnsNeuronCollectionStatus
pub const fn status(&self) -> NnsNeuronCollectionStatus
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 NnsNeuronCollectionState
impl Clone for NnsNeuronCollectionState
Source§fn clone(&self) -> NnsNeuronCollectionState
fn clone(&self) -> NnsNeuronCollectionState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more