Enum chain_impl_mockchain::vote::payload::Payload
source · pub enum Payload {
Public {
choice: Choice,
},
Private {
encrypted_vote: EncryptedVote,
proof: ProofOfCorrectVote,
},
}
Variants§
Implementations§
source§impl Payload
impl Payload
pub fn public(choice: Choice) -> Self
pub fn private(encrypted_vote: EncryptedVote, proof: ProofOfCorrectVote) -> Self
pub fn payload_type(&self) -> PayloadType
pub(crate) fn serialize_in<T>(&self, bb: ByteBuilder<T>) -> ByteBuilder<T>
pub(crate) fn read(codec: &mut Codec<&[u8]>) -> Result<Self, ReadError>
Trait Implementations§
source§impl PartialEq<Payload> for Payload
impl PartialEq<Payload> for Payload
impl Eq for Payload
impl StructuralEq for Payload
impl StructuralPartialEq for Payload
Auto Trait Implementations§
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnwindSafe for Payload
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