[−][src]Struct exonum::messages::Precommit
Pre-commit for a block, essentially meaning that a validator node endorses the block. The consensus algorithm ensures that once a Byzantine majority of validators has endorsed a block, no other block at the same height may be endorsed at any point in the future. Thus, such a block can be considered committed.
Fields (Non-exhaustive)
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.validator: ValidatorId
ID of the validator endorsing the block.
epoch: Height
The height to which the message is related.
round: Round
The round to which the message is related.
propose_hash: Hash
Hash of the block proposal. Note that the proposal format is not defined by the core.
block_hash: Hash
Hash of the new block.
time: DateTime<Utc>
Local time of the validator node when the Precommit
was created.
Methods
impl Precommit
[src]
pub fn new(
validator: ValidatorId,
epoch: Height,
round: Round,
propose_hash: Hash,
block_hash: Hash,
time: DateTime<Utc>
) -> Self
[src]
validator: ValidatorId,
epoch: Height,
round: Round,
propose_hash: Hash,
block_hash: Hash,
time: DateTime<Utc>
) -> Self
Create new Precommit
message.
Trait Implementations
impl Clone for Precommit
[src]
impl Debug for Precommit
[src]
impl<'de> Deserialize<'de> for Precommit
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Precommit
[src]
impl From<Precommit> for CoreMessage
[src]
impl IntoMessage for Precommit
[src]
type Container = CoreMessage
Container for the message.
impl Ord for Precommit
[src]
fn cmp(&self, other: &Precommit) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Precommit> for Precommit
[src]
impl PartialOrd<Precommit> for Precommit
[src]
fn partial_cmp(&self, other: &Precommit) -> Option<Ordering>
[src]
fn lt(&self, other: &Precommit) -> bool
[src]
fn le(&self, other: &Precommit) -> bool
[src]
fn gt(&self, other: &Precommit) -> bool
[src]
fn ge(&self, other: &Precommit) -> bool
[src]
impl ProtobufConvert for Precommit
[src]
type ProtoStruct = Precommit
Type generated from the Protobuf definition.
fn from_pb(pb: Self::ProtoStruct) -> Result<Self, Error>
[src]
fn to_pb(&self) -> Self::ProtoStruct
[src]
impl Serialize for Precommit
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Precommit
[src]
impl StructuralPartialEq for Precommit
[src]
impl<'_> TryFrom<&'_ SignedMessage> for Precommit
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(value: &SignedMessage) -> Result<Self, Self::Error>
[src]
impl TryFrom<CoreMessage> for Precommit
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(msg: CoreMessage) -> Result<Self>
[src]
impl TryFrom<SignedMessage> for Precommit
[src]
Auto Trait Implementations
impl RefUnwindSafe for Precommit
impl Send for Precommit
impl Sync for Precommit
impl Unpin for Precommit
impl UnwindSafe for Precommit
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> 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>,