Struct aleph_bft_crypto::UncheckedSigned
source · pub struct UncheckedSigned<T: Signable, S: Signature> { /* private fields */ }
Expand description
A pair consisting of an instance of the Signable
trait and an (arbitrary) signature.
The method [UncheckedSigned::check]
can be used to upgrade this struct
to
[Signed<T, K>]
which ensures that the signature matches the signed object.
Implementations§
source§impl<T: Signable, S: Signature> UncheckedSigned<T, S>
impl<T: Signable, S: Signature> UncheckedSigned<T, S>
pub fn as_signable(&self) -> &T
pub fn into_signable(self) -> T
pub fn signature(&self) -> S
source§impl<T: Signable, S: Signature> UncheckedSigned<Indexed<T>, S>
impl<T: Signable, S: Signature> UncheckedSigned<Indexed<T>, S>
pub fn as_signable_strip_index(&self) -> &T
source§impl<T: Signable, S: PartialMultisignature> UncheckedSigned<T, S>
impl<T: Signable, S: PartialMultisignature> UncheckedSigned<T, S>
sourcepub fn check_multi<MK: MultiKeychain<PartialMultisignature = S>>(
self,
keychain: &MK
) -> Result<Multisigned<T, MK>, SignatureError<T, S>>
pub fn check_multi<MK: MultiKeychain<PartialMultisignature = S>>( self, keychain: &MK ) -> Result<Multisigned<T, MK>, SignatureError<T, S>>
Verifies whether the multisignature matches the signed data.
Trait Implementations§
source§impl<T: Clone + Signable, S: Clone + Signature> Clone for UncheckedSigned<T, S>
impl<T: Clone + Signable, S: Clone + Signature> Clone for UncheckedSigned<T, S>
source§fn clone(&self) -> UncheckedSigned<T, S>
fn clone(&self) -> UncheckedSigned<T, S>
Returns a copy 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<T, S> Decode for UncheckedSigned<T, S>
impl<T, S> Decode for UncheckedSigned<T, S>
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§impl<T, S> Encode for UncheckedSigned<T, S>
impl<T, S> Encode for UncheckedSigned<T, S>
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl<T: Signable, MK: MultiKeychain> From<Multisigned<T, MK>> for UncheckedSigned<T, MK::PartialMultisignature>
impl<T: Signable, MK: MultiKeychain> From<Multisigned<T, MK>> for UncheckedSigned<T, MK::PartialMultisignature>
source§fn from(signed: Multisigned<T, MK>) -> Self
fn from(signed: Multisigned<T, MK>) -> Self
Converts to this type from the input type.
source§impl<T: Signable + Index, K: Keychain> From<Signed<T, K>> for UncheckedSigned<T, K::Signature>
impl<T: Signable + Index, K: Keychain> From<Signed<T, K>> for UncheckedSigned<T, K::Signature>
source§impl<T: Signable, S: Signature> From<UncheckedSigned<Indexed<T>, S>> for UncheckedSigned<T, S>
impl<T: Signable, S: Signature> From<UncheckedSigned<Indexed<T>, S>> for UncheckedSigned<T, S>
source§fn from(us: UncheckedSigned<Indexed<T>, S>) -> Self
fn from(us: UncheckedSigned<Indexed<T>, S>) -> Self
Converts to this type from the input type.
source§impl<T: PartialEq + Signable, S: PartialEq + Signature> PartialEq for UncheckedSigned<T, S>
impl<T: PartialEq + Signable, S: PartialEq + Signature> PartialEq for UncheckedSigned<T, S>
source§fn eq(&self, other: &UncheckedSigned<T, S>) -> bool
fn eq(&self, other: &UncheckedSigned<T, S>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T, S> EncodeLike for UncheckedSigned<T, S>
impl<T: Eq + Signable, S: Eq + Signature> Eq for UncheckedSigned<T, S>
impl<T: Signable, S: Signature> StructuralPartialEq for UncheckedSigned<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for UncheckedSigned<T, S>
impl<T, S> RefUnwindSafe for UncheckedSigned<T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for UncheckedSigned<T, S>where
T: Send,
impl<T, S> Sync for UncheckedSigned<T, S>where
T: Sync,
impl<T, S> Unpin for UncheckedSigned<T, S>
impl<T, S> UnwindSafe for UncheckedSigned<T, S>where
S: UnwindSafe,
T: 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