Struct tendermint_machine::SignedMessage
source · pub struct SignedMessage<V: ValidatorId, B: Block, S: Signature> { /* private fields */ }Expand description
A signed Tendermint consensus message to be broadcast to the other validators.
Implementations
sourceimpl<V: ValidatorId, B: Block, S: Signature> SignedMessage<V, B, S>
impl<V: ValidatorId, B: Block, S: Signature> SignedMessage<V, B, S>
sourcepub fn number(&self) -> BlockNumber
pub fn number(&self) -> BlockNumber
Number of the block this message is attempting to add to the chain.
pub fn verify_signature<Scheme: SignatureScheme<ValidatorId = V, Signature = S>>(
&self,
signer: &Scheme
) -> bool
Trait Implementations
sourceimpl<V: Clone + ValidatorId, B: Clone + Block, S: Clone + Signature> Clone for SignedMessage<V, B, S>
impl<V: Clone + ValidatorId, B: Clone + Block, S: Clone + Signature> Clone for SignedMessage<V, B, S>
sourcefn clone(&self) -> SignedMessage<V, B, S>
fn clone(&self) -> SignedMessage<V, B, S>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<V: Debug + ValidatorId, B: Debug + Block, S: Debug + Signature> Debug for SignedMessage<V, B, S>
impl<V: Debug + ValidatorId, B: Debug + Block, S: Debug + Signature> Debug for SignedMessage<V, B, S>
sourceimpl<V: ValidatorId, B: Block, S: Signature> Decode for SignedMessage<V, B, S>where
Message<V, B, S>: Decode,
Message<V, B, S>: Decode,
S: Decode,
S: Decode,
impl<V: ValidatorId, B: Block, S: Signature> Decode for SignedMessage<V, B, S>where
Message<V, B, S>: Decode,
Message<V, B, S>: Decode,
S: Decode,
S: Decode,
sourcefn 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.
sourcefn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
sourcefn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
sourceimpl<V: ValidatorId, B: Block, S: Signature> Encode for SignedMessage<V, B, S>where
Message<V, B, S>: Encode,
Message<V, B, S>: Encode,
S: Encode,
S: Encode,
impl<V: ValidatorId, B: Block, S: Signature> Encode for SignedMessage<V, B, S>where
Message<V, B, S>: Encode,
Message<V, B, S>: Encode,
S: Encode,
S: Encode,
sourcefn 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.
sourcefn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
sourcefn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
sourcefn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
sourceimpl<V: PartialEq + ValidatorId, B: PartialEq + Block, S: PartialEq + Signature> PartialEq<SignedMessage<V, B, S>> for SignedMessage<V, B, S>
impl<V: PartialEq + ValidatorId, B: PartialEq + Block, S: PartialEq + Signature> PartialEq<SignedMessage<V, B, S>> for SignedMessage<V, B, S>
sourcefn eq(&self, other: &SignedMessage<V, B, S>) -> bool
fn eq(&self, other: &SignedMessage<V, B, S>) -> bool
impl<V: ValidatorId, B: Block, S: Signature> EncodeLike<SignedMessage<V, B, S>> for SignedMessage<V, B, S>where
Message<V, B, S>: Encode,
Message<V, B, S>: Encode,
S: Encode,
S: Encode,
impl<V: ValidatorId, B: Block, S: Signature> StructuralPartialEq for SignedMessage<V, B, S>
Auto Trait Implementations
impl<V, B, S> RefUnwindSafe for SignedMessage<V, B, S>where
B: RefUnwindSafe,
S: RefUnwindSafe,
V: RefUnwindSafe,
<B as Block>::Id: RefUnwindSafe,
impl<V, B, S> Send for SignedMessage<V, B, S>
impl<V, B, S> Sync for SignedMessage<V, B, S>
impl<V, B, S> Unpin for SignedMessage<V, B, S>where
B: Unpin,
S: Unpin,
V: Unpin,
<B as Block>::Id: Unpin,
impl<V, B, S> UnwindSafe for SignedMessage<V, B, S>where
B: UnwindSafe,
S: UnwindSafe,
V: UnwindSafe,
<B as Block>::Id: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more