Struct cryptoballot::Signed [−][src]
pub struct Signed<T: CryptoBallotTransaction + Serialize> { pub tx: T, pub sig: Signature, }
Expand description
A generic signed transaction
Fields
tx: T
sig: Signature
Implementations
impl<T: CryptoBallotTransaction + Serialize> Signed<T>
[src]
impl<T: CryptoBallotTransaction + Serialize> Signed<T>
[src]pub fn sign(secret: &SecretKey, transaction: T) -> Result<Self, Error>
[src]
pub fn sign(secret: &SecretKey, transaction: T) -> Result<Self, Error>
[src]Sign a transaction, producing a Signed
pub fn verify_signature(&self) -> Result<(), ValidationError>
[src]
pub fn verify_signature(&self) -> Result<(), ValidationError>
[src]Verify the signature on a signed transaction
pub fn id(&self) -> Identifier
[src]
pub fn id(&self) -> Identifier
[src]Get the transaction ID
Trait Implementations
impl<T: CryptoBallotTransaction + Serialize> AsRef<T> for Signed<T>
[src]
impl<T: CryptoBallotTransaction + Serialize> AsRef<T> for Signed<T>
[src]impl<T: CryptoBallotTransaction + Serialize> Deref for Signed<T>
[src]
impl<T: CryptoBallotTransaction + Serialize> Deref for Signed<T>
[src]impl<'de, T: CryptoBallotTransaction + Serialize> Deserialize<'de> for Signed<T> where
T: Deserialize<'de>,
[src]
impl<'de, T: CryptoBallotTransaction + Serialize> Deserialize<'de> for Signed<T> where
T: Deserialize<'de>,
[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 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.
Auto Trait Implementations
impl<T> RefUnwindSafe for Signed<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Signed<T> where
T: Send,
T: Send,
impl<T> Sync for Signed<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Signed<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Signed<T> where
T: UnwindSafe,
T: UnwindSafe,
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> ToHex for T where
T: AsRef<[u8]>,
[src]
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]
pub fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
[src]Encode the hex strict representing self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read more
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]
pub fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
[src]Encode the hex strict representing self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
impl<T> ToHex for T where
T: AsRef<[u8]>,
[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>,