pub struct CommitRevealVote { /* private fields */ }Implementations§
Source§impl CommitRevealVote
impl CommitRevealVote
pub fn new() -> Self
pub fn commit(&self, voter: &str, commitment_hex: &str) -> Result<(), String>
pub fn end_commit_phase(&self)
pub fn reveal( &self, voter: &str, vote: &str, nonce_hex: &str, ) -> Result<(), String>
pub fn tally(&self) -> HashMap<String, usize>
pub fn voter_count(&self) -> usize
pub fn reveal_count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CommitRevealVote
impl RefUnwindSafe for CommitRevealVote
impl Send for CommitRevealVote
impl Sync for CommitRevealVote
impl Unpin for CommitRevealVote
impl UnsafeUnpin for CommitRevealVote
impl UnwindSafe for CommitRevealVote
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