Enum chain_impl_mockchain::vote::Tally
source · pub enum Tally {
Public {
result: TallyResult,
},
Private {
state: PrivateTallyState,
},
}
Variants§
Implementations§
source§impl Tally
impl Tally
pub fn new_public(result: TallyResult) -> Self
pub fn new_private(encrypted_tally: EncryptedTally) -> Self
pub fn is_public(&self) -> bool
pub fn is_private(&self) -> bool
pub fn result(&self) -> Option<&TallyResult>
pub fn private_encrypted(&self) -> Result<&EncryptedTally, TallyError>
pub fn private_set_result(self, result: TallyResult) -> Result<Self, TallyError>
Trait Implementations§
source§impl PartialEq<Tally> for Tally
impl PartialEq<Tally> for Tally
impl Eq for Tally
impl StructuralEq for Tally
impl StructuralPartialEq for Tally
Auto Trait Implementations§
impl RefUnwindSafe for Tally
impl Send for Tally
impl Sync for Tally
impl Unpin for Tally
impl UnwindSafe for Tally
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