pub struct CurrentEpochProposals { /* private fields */ }Expand description
Tracks proposals through voting, approval, and commit lifecycle.
This is the internal state container for proposal management.
Use GroupHandle methods for access.
Implementations§
Source§impl CurrentEpochProposals
impl CurrentEpochProposals
Sourcepub fn add_proposal(
&mut self,
proposal_id: ProposalId,
proposal: GroupUpdateRequest,
)
pub fn add_proposal( &mut self, proposal_id: ProposalId, proposal: GroupUpdateRequest, )
Add a proposal to the approved proposals queue.
Sourcepub fn approved_proposals_count(&self) -> usize
pub fn approved_proposals_count(&self) -> usize
Get the count of approved proposals waiting for voting.
Sourcepub fn approved_proposals(&self) -> HashMap<ProposalId, GroupUpdateRequest>
pub fn approved_proposals(&self) -> HashMap<ProposalId, GroupUpdateRequest>
Get a copy of the approved proposals.
Sourcepub fn add_voting_proposal(
&mut self,
proposal_id: ProposalId,
proposal: GroupUpdateRequest,
)
pub fn add_voting_proposal( &mut self, proposal_id: ProposalId, proposal: GroupUpdateRequest, )
Add a proposal to the voting proposals queue.
§Arguments
proposal_id- The proposal IDproposal- The group update request to add
pub fn remove_voting_proposal(&mut self, proposal_id: ProposalId)
Sourcepub fn clear_approved_proposals(&mut self)
pub fn clear_approved_proposals(&mut self)
Clear the approved proposals, archiving them to epoch history.
Sourcepub fn epoch_history(
&self,
) -> &VecDeque<HashMap<ProposalId, GroupUpdateRequest>>
pub fn epoch_history( &self, ) -> &VecDeque<HashMap<ProposalId, GroupUpdateRequest>>
Get the epoch history (past batches of approved proposals, most recent last).
pub fn move_proposal_to_approved(&mut self, proposal_id: ProposalId)
pub fn is_owner_of_proposal(&self, proposal_id: ProposalId) -> bool
Trait Implementations§
Source§impl Clone for CurrentEpochProposals
impl Clone for CurrentEpochProposals
Source§fn clone(&self) -> CurrentEpochProposals
fn clone(&self) -> CurrentEpochProposals
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CurrentEpochProposals
impl Debug for CurrentEpochProposals
Source§impl Default for CurrentEpochProposals
impl Default for CurrentEpochProposals
Source§fn default() -> CurrentEpochProposals
fn default() -> CurrentEpochProposals
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CurrentEpochProposals
impl RefUnwindSafe for CurrentEpochProposals
impl Send for CurrentEpochProposals
impl Sync for CurrentEpochProposals
impl Unpin for CurrentEpochProposals
impl UnwindSafe for CurrentEpochProposals
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more