pub struct SignedDealerLog<V: Variant, S: Signer> { /* private fields */ }Expand description
A DealerLog, but identified to and signed by a dealer.
The SignedDealerLog::check method allows extracting a public key (the dealer)
and a DealerLog from this struct.
This avoids having to trust some other party or process for knowing that a dealer actually produced a log.
Implementations§
Source§impl<V: Variant, S: Signer> SignedDealerLog<V, S>
impl<V: Variant, S: Signer> SignedDealerLog<V, S>
Sourcepub fn check(
self,
info: &Info<V, S::PublicKey>,
) -> Option<(S::PublicKey, DealerLog<V, S::PublicKey>)>
pub fn check( self, info: &Info<V, S::PublicKey>, ) -> Option<(S::PublicKey, DealerLog<V, S::PublicKey>)>
Check this log for a particular round.
This will produce the public key of the dealer that signed this log, and the underlying log that they signed.
This will return Option::None if the check fails.
Trait Implementations§
Source§impl<V: Clone + Variant, S: Clone + Signer> Clone for SignedDealerLog<V, S>
impl<V: Clone + Variant, S: Clone + Signer> Clone for SignedDealerLog<V, S>
Source§fn clone(&self) -> SignedDealerLog<V, S>
fn clone(&self) -> SignedDealerLog<V, S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<V: Variant, S: Signer> EncodeSize for SignedDealerLog<V, S>
impl<V: Variant, S: Signer> EncodeSize for SignedDealerLog<V, S>
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Auto Trait Implementations§
impl<V, S> Freeze for SignedDealerLog<V, S>
impl<V, S> RefUnwindSafe for SignedDealerLog<V, S>where
<S as Signer>::PublicKey: RefUnwindSafe,
<S as Signer>::Signature: RefUnwindSafe,
<V as Variant>::Public: RefUnwindSafe,
impl<V, S> Send for SignedDealerLog<V, S>
impl<V, S> Sync for SignedDealerLog<V, S>
impl<V, S> Unpin for SignedDealerLog<V, S>
impl<V, S> UnwindSafe for SignedDealerLog<V, S>where
<S as Signer>::PublicKey: UnwindSafe,
<S as Signer>::Signature: UnwindSafe,
<V as Variant>::Public: 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<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more