[−][src]Struct cryptoballot::Signed
A generic signed transaction
Fields
tx: T
sig: Signature
Methods
impl<T: Signable + Serialize> Signed<T>
[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]
Verify the signature on a signed transaction
pub fn inner(&self) -> &T
[src]
Get the inner unsigned transaction
pub fn id(&self) -> Identifier
[src]
Get the transaction ID
pub fn validate<S: Store>(&self, store: &S) -> Result<(), ValidationError>
[src]
Verify the signature and validate the transaction
Trait Implementations
impl<T: Signable + Serialize> AsRef<T> for Signed<T>
[src]
impl<T: Clone + Signable + Serialize> Clone for Signed<T>
[src]
impl<T: Debug + Signable + Serialize> Debug for Signed<T>
[src]
impl<T: Signable + Serialize> Deref for Signed<T>
[src]
impl<'de, T: Signable + Serialize> Deserialize<'de> for Signed<T> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<Signed<DecryptionTransaction>> for SignedTransaction
[src]
fn from(tx: Signed<DecryptionTransaction>) -> Self
[src]
impl From<Signed<ElectionTransaction>> for SignedTransaction
[src]
fn from(tx: Signed<ElectionTransaction>) -> Self
[src]
impl From<Signed<SecretShareTransaction>> for SignedTransaction
[src]
fn from(tx: Signed<SecretShareTransaction>) -> Self
[src]
impl From<Signed<VoteTransaction>> for SignedTransaction
[src]
fn from(tx: Signed<VoteTransaction>) -> Self
[src]
impl From<SignedTransaction> for Signed<ElectionTransaction>
[src]
fn from(tx: SignedTransaction) -> Self
[src]
impl From<SignedTransaction> for Signed<VoteTransaction>
[src]
fn from(tx: SignedTransaction) -> Self
[src]
impl From<SignedTransaction> for Signed<DecryptionTransaction>
[src]
fn from(tx: SignedTransaction) -> Self
[src]
impl From<SignedTransaction> for Signed<SecretShareTransaction>
[src]
fn from(tx: SignedTransaction) -> Self
[src]
impl<T: Signable + Serialize> Serialize for Signed<T> where
T: Serialize,
[src]
T: Serialize,
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToHex for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
fn write_hex<W>(&self, w: &mut W) -> Result<(), Error> where
W: Write,
[src]
W: Write,
fn write_hex_upper<W>(&self, w: &mut W) -> Result<(), Error> where
W: Write,
[src]
W: Write,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,