#[non_exhaustive]pub struct ConsensusCommitPrologue {
pub epoch: Option<u64>,
pub round: Option<u64>,
pub commit_timestamp: Option<Timestamp>,
pub consensus_commit_digest: Option<String>,
pub sub_dag_index: Option<u64>,
pub consensus_determined_version_assignments: Option<ConsensusDeterminedVersionAssignments>,
pub additional_state_digest: Option<String>,
}
Expand description
Consensus commit prologue system transaction.
This message can represent V1, V2, and V3 prologue types.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.epoch: Option<u64>
Epoch of the commit prologue transaction.
Present in V1, V2, V3, V4.
round: Option<u64>
Consensus round of the commit.
Present in V1, V2, V3, V4.
commit_timestamp: Option<Timestamp>
Unix timestamp from consensus.
Present in V1, V2, V3, V4.
consensus_commit_digest: Option<String>
Digest of consensus output.
Present in V2, V3, V4.
sub_dag_index: Option<u64>
The sub DAG index of the consensus commit. This field is populated if there are multiple consensus commits per round.
Present in V3, V4.
consensus_determined_version_assignments: Option<ConsensusDeterminedVersionAssignments>
Stores consensus handler determined consensus object version assignments.
Present in V3, V4.
additional_state_digest: Option<String>
Digest of any additional state computed by the consensus handler. Used to detect forking bugs as early as possible.
Present in V4.
Implementations§
Source§impl ConsensusCommitPrologue
impl ConsensusCommitPrologue
pub const EPOCH_FIELD: &'static MessageField
pub const ROUND_FIELD: &'static MessageField
pub const COMMIT_TIMESTAMP_FIELD: &'static MessageField
pub const CONSENSUS_COMMIT_DIGEST_FIELD: &'static MessageField
pub const SUB_DAG_INDEX_FIELD: &'static MessageField
pub const CONSENSUS_DETERMINED_VERSION_ASSIGNMENTS_FIELD: &'static MessageField
pub const ADDITIONAL_STATE_DIGEST_FIELD: &'static MessageField
Source§impl ConsensusCommitPrologue
impl ConsensusCommitPrologue
pub fn path_builder() -> ConsensusCommitPrologueFieldPathBuilder
Source§impl ConsensusCommitPrologue
impl ConsensusCommitPrologue
pub const fn const_default() -> Self
Sourcepub fn epoch_opt_mut(&mut self) -> Option<&mut u64>
pub fn epoch_opt_mut(&mut self) -> Option<&mut u64>
Sourcepub fn epoch_mut(&mut self) -> &mut u64
pub fn epoch_mut(&mut self) -> &mut u64
Returns a mutable reference to epoch
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn with_epoch<T: Into<u64>>(self, field: T) -> Self
pub fn with_epoch<T: Into<u64>>(self, field: T) -> Self
Sets epoch
with the provided value.
Sourcepub fn round_opt_mut(&mut self) -> Option<&mut u64>
pub fn round_opt_mut(&mut self) -> Option<&mut u64>
Sourcepub fn round_mut(&mut self) -> &mut u64
pub fn round_mut(&mut self) -> &mut u64
Returns a mutable reference to round
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn with_round<T: Into<u64>>(self, field: T) -> Self
pub fn with_round<T: Into<u64>>(self, field: T) -> Self
Sets round
with the provided value.
Sourcepub fn commit_timestamp_opt_mut(&mut self) -> Option<&mut Timestamp>
pub fn commit_timestamp_opt_mut(&mut self) -> Option<&mut Timestamp>
Sourcepub fn commit_timestamp_mut(&mut self) -> &mut Timestamp
pub fn commit_timestamp_mut(&mut self) -> &mut Timestamp
Returns a mutable reference to commit_timestamp
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn commit_timestamp_opt(&self) -> Option<&Timestamp>
pub fn commit_timestamp_opt(&self) -> Option<&Timestamp>
Sourcepub fn set_commit_timestamp<T: Into<Timestamp>>(&mut self, field: T)
pub fn set_commit_timestamp<T: Into<Timestamp>>(&mut self, field: T)
Sets commit_timestamp
with the provided value.
Sourcepub fn with_commit_timestamp<T: Into<Timestamp>>(self, field: T) -> Self
pub fn with_commit_timestamp<T: Into<Timestamp>>(self, field: T) -> Self
Sets commit_timestamp
with the provided value.
Sourcepub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String>
pub fn consensus_commit_digest_opt_mut(&mut self) -> Option<&mut String>
Sourcepub fn consensus_commit_digest_mut(&mut self) -> &mut String
pub fn consensus_commit_digest_mut(&mut self) -> &mut String
Returns a mutable reference to consensus_commit_digest
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn consensus_commit_digest_opt(&self) -> Option<&str>
pub fn consensus_commit_digest_opt(&self) -> Option<&str>
Sourcepub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T)
pub fn set_consensus_commit_digest<T: Into<String>>(&mut self, field: T)
Sets consensus_commit_digest
with the provided value.
Sourcepub fn with_consensus_commit_digest<T: Into<String>>(self, field: T) -> Self
pub fn with_consensus_commit_digest<T: Into<String>>(self, field: T) -> Self
Sets consensus_commit_digest
with the provided value.
Sourcepub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64>
pub fn sub_dag_index_opt_mut(&mut self) -> Option<&mut u64>
Sourcepub fn sub_dag_index_mut(&mut self) -> &mut u64
pub fn sub_dag_index_mut(&mut self) -> &mut u64
Returns a mutable reference to sub_dag_index
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn sub_dag_index_opt(&self) -> Option<u64>
pub fn sub_dag_index_opt(&self) -> Option<u64>
Sourcepub fn set_sub_dag_index<T: Into<u64>>(&mut self, field: T)
pub fn set_sub_dag_index<T: Into<u64>>(&mut self, field: T)
Sets sub_dag_index
with the provided value.
Sourcepub fn with_sub_dag_index<T: Into<u64>>(self, field: T) -> Self
pub fn with_sub_dag_index<T: Into<u64>>(self, field: T) -> Self
Sets sub_dag_index
with the provided value.
Sourcepub fn consensus_determined_version_assignments(
&self,
) -> &ConsensusDeterminedVersionAssignments
pub fn consensus_determined_version_assignments( &self, ) -> &ConsensusDeterminedVersionAssignments
Returns the value of consensus_determined_version_assignments
, or the default value if consensus_determined_version_assignments
is unset.
Sourcepub fn consensus_determined_version_assignments_opt_mut(
&mut self,
) -> Option<&mut ConsensusDeterminedVersionAssignments>
pub fn consensus_determined_version_assignments_opt_mut( &mut self, ) -> Option<&mut ConsensusDeterminedVersionAssignments>
Sourcepub fn consensus_determined_version_assignments_mut(
&mut self,
) -> &mut ConsensusDeterminedVersionAssignments
pub fn consensus_determined_version_assignments_mut( &mut self, ) -> &mut ConsensusDeterminedVersionAssignments
Returns a mutable reference to consensus_determined_version_assignments
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn consensus_determined_version_assignments_opt(
&self,
) -> Option<&ConsensusDeterminedVersionAssignments>
pub fn consensus_determined_version_assignments_opt( &self, ) -> Option<&ConsensusDeterminedVersionAssignments>
Sourcepub fn set_consensus_determined_version_assignments<T: Into<ConsensusDeterminedVersionAssignments>>(
&mut self,
field: T,
)
pub fn set_consensus_determined_version_assignments<T: Into<ConsensusDeterminedVersionAssignments>>( &mut self, field: T, )
Sets consensus_determined_version_assignments
with the provided value.
Sourcepub fn with_consensus_determined_version_assignments<T: Into<ConsensusDeterminedVersionAssignments>>(
self,
field: T,
) -> Self
pub fn with_consensus_determined_version_assignments<T: Into<ConsensusDeterminedVersionAssignments>>( self, field: T, ) -> Self
Sets consensus_determined_version_assignments
with the provided value.
Sourcepub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String>
pub fn additional_state_digest_opt_mut(&mut self) -> Option<&mut String>
Sourcepub fn additional_state_digest_mut(&mut self) -> &mut String
pub fn additional_state_digest_mut(&mut self) -> &mut String
Returns a mutable reference to additional_state_digest
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn additional_state_digest_opt(&self) -> Option<&str>
pub fn additional_state_digest_opt(&self) -> Option<&str>
Sourcepub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T)
pub fn set_additional_state_digest<T: Into<String>>(&mut self, field: T)
Sets additional_state_digest
with the provided value.
Sourcepub fn with_additional_state_digest<T: Into<String>>(self, field: T) -> Self
pub fn with_additional_state_digest<T: Into<String>>(self, field: T) -> Self
Sets additional_state_digest
with the provided value.
Source§impl ConsensusCommitPrologue
impl ConsensusCommitPrologue
Sourcepub fn consensus_commit_digest(&self) -> &str
pub fn consensus_commit_digest(&self) -> &str
Returns the value of consensus_commit_digest
, or the default value if consensus_commit_digest
is unset.
Sourcepub fn sub_dag_index(&self) -> u64
pub fn sub_dag_index(&self) -> u64
Returns the value of sub_dag_index
, or the default value if sub_dag_index
is unset.
Sourcepub fn additional_state_digest(&self) -> &str
pub fn additional_state_digest(&self) -> &str
Returns the value of additional_state_digest
, or the default value if additional_state_digest
is unset.
Trait Implementations§
Source§impl Clone for ConsensusCommitPrologue
impl Clone for ConsensusCommitPrologue
Source§fn clone(&self) -> ConsensusCommitPrologue
fn clone(&self) -> ConsensusCommitPrologue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ConsensusCommitPrologue
impl Debug for ConsensusCommitPrologue
Source§impl Default for ConsensusCommitPrologue
impl Default for ConsensusCommitPrologue
§impl<'de> Deserialize<'de> for ConsensusCommitPrologue
impl<'de> Deserialize<'de> for ConsensusCommitPrologue
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl From<ConsensusCommitPrologue> for ConsensusCommitPrologue
impl From<ConsensusCommitPrologue> for ConsensusCommitPrologue
Source§fn from(value: ConsensusCommitPrologue) -> Self
fn from(value: ConsensusCommitPrologue) -> Self
Source§impl From<ConsensusCommitPrologueV2> for ConsensusCommitPrologue
impl From<ConsensusCommitPrologueV2> for ConsensusCommitPrologue
Source§fn from(value: ConsensusCommitPrologueV2) -> Self
fn from(value: ConsensusCommitPrologueV2) -> Self
Source§impl From<ConsensusCommitPrologueV3> for ConsensusCommitPrologue
impl From<ConsensusCommitPrologueV3> for ConsensusCommitPrologue
Source§fn from(value: ConsensusCommitPrologueV3) -> Self
fn from(value: ConsensusCommitPrologueV3) -> Self
Source§impl From<ConsensusCommitPrologueV4> for ConsensusCommitPrologue
impl From<ConsensusCommitPrologueV4> for ConsensusCommitPrologue
Source§fn from(_: ConsensusCommitPrologueV4) -> Self
fn from(_: ConsensusCommitPrologueV4) -> Self
Source§impl Message for ConsensusCommitPrologue
impl Message for ConsensusCommitPrologue
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl MessageFields for ConsensusCommitPrologue
impl MessageFields for ConsensusCommitPrologue
const FIELDS: &'static [&'static MessageField]
Source§impl PartialEq for ConsensusCommitPrologue
impl PartialEq for ConsensusCommitPrologue
§impl Serialize for ConsensusCommitPrologue
impl Serialize for ConsensusCommitPrologue
Source§impl TryFrom<&ConsensusCommitPrologue> for ConsensusCommitPrologue
impl TryFrom<&ConsensusCommitPrologue> for ConsensusCommitPrologue
Source§type Error = TryFromProtoError
type Error = TryFromProtoError
Source§impl TryFrom<&ConsensusCommitPrologue> for ConsensusCommitPrologueV2
impl TryFrom<&ConsensusCommitPrologue> for ConsensusCommitPrologueV2
Source§type Error = TryFromProtoError
type Error = TryFromProtoError
Source§impl TryFrom<&ConsensusCommitPrologue> for ConsensusCommitPrologueV3
impl TryFrom<&ConsensusCommitPrologue> for ConsensusCommitPrologueV3
Source§type Error = TryFromProtoError
type Error = TryFromProtoError
Source§impl TryFrom<&ConsensusCommitPrologue> for ConsensusCommitPrologueV4
impl TryFrom<&ConsensusCommitPrologue> for ConsensusCommitPrologueV4
Source§type Error = TryFromProtoError
type Error = TryFromProtoError
impl StructuralPartialEq for ConsensusCommitPrologue
Auto Trait Implementations§
impl Freeze for ConsensusCommitPrologue
impl RefUnwindSafe for ConsensusCommitPrologue
impl Send for ConsensusCommitPrologue
impl Sync for ConsensusCommitPrologue
impl Unpin for ConsensusCommitPrologue
impl UnwindSafe for ConsensusCommitPrologue
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered
].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.