enum ProposalManagers {
Public {
managers: Vec<ProposalManager>,
},
Private {
managers: Vec<ProposalManager>,
crs: Arc<Crs>,
election_pk: Arc<ElectionPublicKey>,
},
}
Variants§
Implementations§
source§impl ProposalManagers
impl ProposalManagers
fn new(plan: &VotePlan) -> Self
fn managers(&self) -> &[ProposalManager]
fn managers_mut(&mut self) -> &mut [ProposalManager]
sourcepub fn vote(
&self,
identifier: Identifier,
vote_cast: ValidatedVoteCast,
token_distribution: &TokenDistribution<'_, TokenIdentifier>
) -> Result<Self, VoteError>
pub fn vote( &self, identifier: Identifier, vote_cast: ValidatedVoteCast, token_distribution: &TokenDistribution<'_, TokenIdentifier> ) -> Result<Self, VoteError>
Attempt to apply the vote to one of the proposals.
pub fn public_tally<F>( &self, token_distribution: &TokenDistribution<'_, TokenIdentifier>, governance: &Governance, f: F ) -> Result<Self, TallyError>where F: FnMut(&VoteAction),
sourcepub fn validate_vote(
&self,
identifier: &Identifier,
cast: VoteCast
) -> Result<ValidatedVoteCast, VoteError>
pub fn validate_vote( &self, identifier: &Identifier, cast: VoteCast ) -> Result<ValidatedVoteCast, VoteError>
validate the vote against the proposal: verify that the proposal exists and the the length of the ciphertext is correct (if applicable)
pub fn finalize_private_tally<F>( &self, committee_pks: &[MemberPublicKey], decrypted_tally: &DecryptedPrivateTally, governance: &Governance, token_distribution: &TokenDistribution<'_, TokenIdentifier>, f: F ) -> Result<Self, VoteError>where F: FnMut(&VoteAction),
Trait Implementations§
source§impl Clone for ProposalManagers
impl Clone for ProposalManagers
source§fn clone(&self) -> ProposalManagers
fn clone(&self) -> ProposalManagers
Returns a copy 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 PartialEq<ProposalManagers> for ProposalManagers
impl PartialEq<ProposalManagers> for ProposalManagers
source§fn eq(&self, other: &ProposalManagers) -> bool
fn eq(&self, other: &ProposalManagers) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ProposalManagers
impl StructuralEq for ProposalManagers
impl StructuralPartialEq for ProposalManagers
Auto Trait Implementations§
impl RefUnwindSafe for ProposalManagers
impl Send for ProposalManagers
impl Sync for ProposalManagers
impl Unpin for ProposalManagers
impl UnwindSafe for ProposalManagers
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