Struct chain_impl_mockchain::certificate::vote_tally::VoteTally
source · pub struct VoteTally {
id: VotePlanId,
payload: VoteTallyPayload,
}
Fields§
§id: VotePlanId
§payload: VoteTallyPayload
Implementations§
source§impl VoteTally
impl VoteTally
pub fn new_public(id: VotePlanId) -> Self
pub fn new_private( id: VotePlanId, decrypted_tally: DecryptedPrivateTally ) -> Self
pub fn id(&self) -> &VotePlanId
pub fn tally_type(&self) -> PayloadType
pub fn tally_decrypted(&self) -> Option<&DecryptedPrivateTally>
pub fn serialize_in(&self, bb: ByteBuilder<Self>) -> ByteBuilder<Self>
pub fn serialize(&self) -> ByteArray<Self>
Trait Implementations§
source§impl DeserializeFromSlice for VoteTally
impl DeserializeFromSlice for VoteTally
fn deserialize_from_slice(codec: &mut Codec<&[u8]>) -> Result<Self, ReadError>
fn deserialize_validate_from_slice( codec: &mut Codec<&[u8]> ) -> Result<(), ReadError>
source§impl From<VoteTally> for Certificate
impl From<VoteTally> for Certificate
source§impl PartialEq<VoteTally> for VoteTally
impl PartialEq<VoteTally> for VoteTally
source§impl Payload for VoteTally
impl Payload for VoteTally
const HAS_DATA: bool = true
const HAS_AUTH: bool = true
type Auth = TallyProof
fn payload_data(&self) -> PayloadData<Self>
fn payload_auth_data(auth: &Self::Auth) -> PayloadAuthData<Self>
fn payload_to_certificate_slice( p: PayloadSlice<'_, Self> ) -> Option<CertificateSlice<'_>>
source§impl Serialize for VoteTally
impl Serialize for VoteTally
impl Eq for VoteTally
impl StructuralEq for VoteTally
impl StructuralPartialEq for VoteTally
Auto Trait Implementations§
impl RefUnwindSafe for VoteTally
impl Send for VoteTally
impl Sync for VoteTally
impl Unpin for VoteTally
impl UnwindSafe for VoteTally
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