pub struct Signed<V: Variant<Msg>> {
pub msg: V,
pub key: PublicKey,
pub sig: Signature,
}Expand description
Strongly typed signed message. WARNING: signature is not guaranteed to be valid.
Fields§
§msg: VThe message that was signed.
key: PublicKeyThe public key of the signer.
sig: SignatureThe signature.
Implementations§
Trait Implementations§
Source§impl<V: Variant<Msg> + Clone> Distribution<Signed<V>> for Standardwhere
Standard: Distribution<V>,
impl<V: Variant<Msg> + Clone> Distribution<Signed<V>> for Standardwhere
Standard: Distribution<V>,
Source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Signed<V>
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Signed<V>
Generate a random value of
T, using rng as the source of randomness.impl<V: Eq + Variant<Msg>> Eq for Signed<V>
impl<V: PartialEq + Variant<Msg>> StructuralPartialEq for Signed<V>
Auto Trait Implementations§
impl<V> Freeze for Signed<V>where
V: Freeze,
impl<V> RefUnwindSafe for Signed<V>where
V: RefUnwindSafe,
impl<V> Send for Signed<V>where
V: Send,
impl<V> Sync for Signed<V>where
V: Sync,
impl<V> Unpin for Signed<V>where
V: Unpin,
impl<V> UnsafeUnpin for Signed<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for Signed<V>where
V: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.