Enum cryptoballot::SignedTransaction [−][src]
pub enum SignedTransaction { Election(Signed<ElectionTransaction>), KeyGenCommitment(Signed<KeyGenCommitmentTransaction>), KeyGenShare(Signed<KeyGenShareTransaction>), KeyGenPublicKey(Signed<KeyGenPublicKeyTransaction>), EncryptionKey(Signed<EncryptionKeyTransaction>), Vote(Signed<VoteTransaction>), VotingEnd(Signed<VotingEndTransaction>), Mix(Signed<MixTransaction>), PartialDecryption(Signed<PartialDecryptionTransaction>), Decryption(Signed<DecryptionTransaction>), }
Expand description
A signed transaction
Variants
Election(Signed<ElectionTransaction>)
KeyGenCommitment(Signed<KeyGenCommitmentTransaction>)
KeyGenPublicKey(Signed<KeyGenPublicKeyTransaction>)
EncryptionKey(Signed<EncryptionKeyTransaction>)
Vote(Signed<VoteTransaction>)
VotingEnd(Signed<VotingEndTransaction>)
Mix(Signed<MixTransaction>)
PartialDecryption(Signed<PartialDecryptionTransaction>)
Decryption(Signed<DecryptionTransaction>)
Implementations
impl SignedTransaction
[src]
impl SignedTransaction
[src]pub fn transaction_type(&self) -> TransactionType
[src]
pub fn transaction_type(&self) -> TransactionType
[src]Get the transaction type
pub fn id(&self) -> Identifier
[src]
pub fn id(&self) -> Identifier
[src]Get the transaction ID
pub fn validate<S: Store>(&self, s: &S) -> Result<(), ValidationError>
[src]
pub fn validate<S: Store>(&self, s: &S) -> Result<(), ValidationError>
[src]Validate the transaction. This does the following:
- Checks that the id-type matches the transaction-type
- Validates the signature
- Validates the transaction against the store
pub fn verify_signature(&self) -> Result<(), ValidationError>
[src]
pub fn public(&self) -> Option<PublicKey>
[src]
Trait Implementations
impl AsRef<DecryptionTransaction> for SignedTransaction
[src]
impl AsRef<DecryptionTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &DecryptionTransaction
[src]
fn as_ref(&self) -> &DecryptionTransaction
[src]Performs the conversion.
impl AsRef<ElectionTransaction> for SignedTransaction
[src]
impl AsRef<ElectionTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &ElectionTransaction
[src]
fn as_ref(&self) -> &ElectionTransaction
[src]Performs the conversion.
impl AsRef<EncryptionKeyTransaction> for SignedTransaction
[src]
impl AsRef<EncryptionKeyTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &EncryptionKeyTransaction
[src]
fn as_ref(&self) -> &EncryptionKeyTransaction
[src]Performs the conversion.
impl AsRef<KeyGenCommitmentTransaction> for SignedTransaction
[src]
impl AsRef<KeyGenCommitmentTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &KeyGenCommitmentTransaction
[src]
fn as_ref(&self) -> &KeyGenCommitmentTransaction
[src]Performs the conversion.
impl AsRef<KeyGenPublicKeyTransaction> for SignedTransaction
[src]
impl AsRef<KeyGenPublicKeyTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &KeyGenPublicKeyTransaction
[src]
fn as_ref(&self) -> &KeyGenPublicKeyTransaction
[src]Performs the conversion.
impl AsRef<KeyGenShareTransaction> for SignedTransaction
[src]
impl AsRef<KeyGenShareTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &KeyGenShareTransaction
[src]
fn as_ref(&self) -> &KeyGenShareTransaction
[src]Performs the conversion.
impl AsRef<MixTransaction> for SignedTransaction
[src]
impl AsRef<MixTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &MixTransaction
[src]
fn as_ref(&self) -> &MixTransaction
[src]Performs the conversion.
impl AsRef<PartialDecryptionTransaction> for SignedTransaction
[src]
impl AsRef<PartialDecryptionTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &PartialDecryptionTransaction
[src]
fn as_ref(&self) -> &PartialDecryptionTransaction
[src]Performs the conversion.
impl AsRef<VoteTransaction> for SignedTransaction
[src]
impl AsRef<VoteTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &VoteTransaction
[src]
fn as_ref(&self) -> &VoteTransaction
[src]Performs the conversion.
impl AsRef<VotingEndTransaction> for SignedTransaction
[src]
impl AsRef<VotingEndTransaction> for SignedTransaction
[src]fn as_ref(&self) -> &VotingEndTransaction
[src]
fn as_ref(&self) -> &VotingEndTransaction
[src]Performs the conversion.
impl Clone for SignedTransaction
[src]
impl Clone for SignedTransaction
[src]fn clone(&self) -> SignedTransaction
[src]
fn clone(&self) -> SignedTransaction
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<'de> Deserialize<'de> for SignedTransaction
[src]
impl<'de> Deserialize<'de> for SignedTransaction
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl From<Signed<DecryptionTransaction>> for SignedTransaction
[src]
impl From<Signed<DecryptionTransaction>> for SignedTransaction
[src]fn from(tx: Signed<DecryptionTransaction>) -> Self
[src]
fn from(tx: Signed<DecryptionTransaction>) -> Self
[src]Performs the conversion.
impl From<Signed<ElectionTransaction>> for SignedTransaction
[src]
impl From<Signed<ElectionTransaction>> for SignedTransaction
[src]fn from(tx: Signed<ElectionTransaction>) -> Self
[src]
fn from(tx: Signed<ElectionTransaction>) -> Self
[src]Performs the conversion.
impl From<Signed<EncryptionKeyTransaction>> for SignedTransaction
[src]
impl From<Signed<EncryptionKeyTransaction>> for SignedTransaction
[src]fn from(tx: Signed<EncryptionKeyTransaction>) -> Self
[src]
fn from(tx: Signed<EncryptionKeyTransaction>) -> Self
[src]Performs the conversion.
impl From<Signed<KeyGenCommitmentTransaction>> for SignedTransaction
[src]
impl From<Signed<KeyGenCommitmentTransaction>> for SignedTransaction
[src]fn from(tx: Signed<KeyGenCommitmentTransaction>) -> Self
[src]
fn from(tx: Signed<KeyGenCommitmentTransaction>) -> Self
[src]Performs the conversion.
impl From<Signed<KeyGenPublicKeyTransaction>> for SignedTransaction
[src]
impl From<Signed<KeyGenPublicKeyTransaction>> for SignedTransaction
[src]fn from(tx: Signed<KeyGenPublicKeyTransaction>) -> Self
[src]
fn from(tx: Signed<KeyGenPublicKeyTransaction>) -> Self
[src]Performs the conversion.
impl From<Signed<KeyGenShareTransaction>> for SignedTransaction
[src]
impl From<Signed<KeyGenShareTransaction>> for SignedTransaction
[src]fn from(tx: Signed<KeyGenShareTransaction>) -> Self
[src]
fn from(tx: Signed<KeyGenShareTransaction>) -> Self
[src]Performs the conversion.
impl From<Signed<MixTransaction>> for SignedTransaction
[src]
impl From<Signed<MixTransaction>> for SignedTransaction
[src]fn from(tx: Signed<MixTransaction>) -> Self
[src]
fn from(tx: Signed<MixTransaction>) -> Self
[src]Performs the conversion.
impl From<Signed<PartialDecryptionTransaction>> for SignedTransaction
[src]
impl From<Signed<PartialDecryptionTransaction>> for SignedTransaction
[src]fn from(tx: Signed<PartialDecryptionTransaction>) -> Self
[src]
fn from(tx: Signed<PartialDecryptionTransaction>) -> Self
[src]Performs the conversion.
impl From<Signed<VoteTransaction>> for SignedTransaction
[src]
impl From<Signed<VoteTransaction>> for SignedTransaction
[src]fn from(tx: Signed<VoteTransaction>) -> Self
[src]
fn from(tx: Signed<VoteTransaction>) -> Self
[src]Performs the conversion.
impl From<Signed<VotingEndTransaction>> for SignedTransaction
[src]
impl From<Signed<VotingEndTransaction>> for SignedTransaction
[src]fn from(tx: Signed<VotingEndTransaction>) -> Self
[src]
fn from(tx: Signed<VotingEndTransaction>) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<ElectionTransaction>
[src]
impl From<SignedTransaction> for Signed<ElectionTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<KeyGenCommitmentTransaction>
[src]
impl From<SignedTransaction> for Signed<KeyGenCommitmentTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for ElectionTransaction
[src]
impl From<SignedTransaction> for ElectionTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for KeyGenCommitmentTransaction
[src]
impl From<SignedTransaction> for KeyGenCommitmentTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for KeyGenShareTransaction
[src]
impl From<SignedTransaction> for KeyGenShareTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for KeyGenPublicKeyTransaction
[src]
impl From<SignedTransaction> for KeyGenPublicKeyTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for EncryptionKeyTransaction
[src]
impl From<SignedTransaction> for EncryptionKeyTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for VoteTransaction
[src]
impl From<SignedTransaction> for VoteTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for VotingEndTransaction
[src]
impl From<SignedTransaction> for VotingEndTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for MixTransaction
[src]
impl From<SignedTransaction> for MixTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for DecryptionTransaction
[src]
impl From<SignedTransaction> for DecryptionTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for PartialDecryptionTransaction
[src]
impl From<SignedTransaction> for PartialDecryptionTransaction
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<KeyGenShareTransaction>
[src]
impl From<SignedTransaction> for Signed<KeyGenShareTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<KeyGenPublicKeyTransaction>
[src]
impl From<SignedTransaction> for Signed<KeyGenPublicKeyTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<EncryptionKeyTransaction>
[src]
impl From<SignedTransaction> for Signed<EncryptionKeyTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<VoteTransaction>
[src]
impl From<SignedTransaction> for Signed<VoteTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<VotingEndTransaction>
[src]
impl From<SignedTransaction> for Signed<VotingEndTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<MixTransaction>
[src]
impl From<SignedTransaction> for Signed<MixTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<PartialDecryptionTransaction>
[src]
impl From<SignedTransaction> for Signed<PartialDecryptionTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl From<SignedTransaction> for Signed<DecryptionTransaction>
[src]
impl From<SignedTransaction> for Signed<DecryptionTransaction>
[src]fn from(tx: SignedTransaction) -> Self
[src]
fn from(tx: SignedTransaction) -> Self
[src]Performs the conversion.
impl Serialize for SignedTransaction
[src]
impl Serialize for SignedTransaction
[src]Auto Trait Implementations
impl RefUnwindSafe for SignedTransaction
impl Send for SignedTransaction
impl Sync for SignedTransaction
impl Unpin for SignedTransaction
impl UnwindSafe for SignedTransaction
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
[src]
impl<T> Pointable for T
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,