#[non_exhaustive]pub struct Epoch {
pub epoch: Option<u64>,
pub committee: Option<ValidatorCommittee>,
pub system_state: Option<Box<SystemState>>,
pub first_checkpoint: Option<u64>,
pub last_checkpoint: Option<u64>,
pub start: Option<Timestamp>,
pub end: Option<Timestamp>,
pub reference_gas_price: Option<u64>,
pub protocol_config: Option<ProtocolConfig>,
}
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>
§committee: Option<ValidatorCommittee>
The committee governing this epoch.
system_state: Option<Box<SystemState>>
Snapshot of Sui’s SystemState (0x3::sui_system::SystemState
) at the
beginning of the epoch, for past epochs, or the current state for the
current epoch.
first_checkpoint: Option<u64>
§last_checkpoint: Option<u64>
§start: Option<Timestamp>
§end: Option<Timestamp>
§reference_gas_price: Option<u64>
Reference gas price denominated in MIST
protocol_config: Option<ProtocolConfig>
Implementations§
Source§impl Epoch
impl Epoch
pub const EPOCH_FIELD: &'static MessageField
pub const COMMITTEE_FIELD: &'static MessageField
pub const SYSTEM_STATE_FIELD: &'static MessageField
pub const FIRST_CHECKPOINT_FIELD: &'static MessageField
pub const LAST_CHECKPOINT_FIELD: &'static MessageField
pub const START_FIELD: &'static MessageField
pub const END_FIELD: &'static MessageField
pub const REFERENCE_GAS_PRICE_FIELD: &'static MessageField
pub const PROTOCOL_CONFIG_FIELD: &'static MessageField
Source§impl Epoch
impl Epoch
pub fn path_builder() -> EpochFieldPathBuilder
Source§impl Epoch
impl Epoch
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 committee(&self) -> &ValidatorCommittee
pub fn committee(&self) -> &ValidatorCommittee
Returns the value of committee
, or the default value if committee
is unset.
Sourcepub fn committee_opt_mut(&mut self) -> Option<&mut ValidatorCommittee>
pub fn committee_opt_mut(&mut self) -> Option<&mut ValidatorCommittee>
Sourcepub fn committee_mut(&mut self) -> &mut ValidatorCommittee
pub fn committee_mut(&mut self) -> &mut ValidatorCommittee
Returns a mutable reference to committee
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn committee_opt(&self) -> Option<&ValidatorCommittee>
pub fn committee_opt(&self) -> Option<&ValidatorCommittee>
Sourcepub fn set_committee<T: Into<ValidatorCommittee>>(&mut self, field: T)
pub fn set_committee<T: Into<ValidatorCommittee>>(&mut self, field: T)
Sets committee
with the provided value.
Sourcepub fn with_committee<T: Into<ValidatorCommittee>>(self, field: T) -> Self
pub fn with_committee<T: Into<ValidatorCommittee>>(self, field: T) -> Self
Sets committee
with the provided value.
Sourcepub fn system_state(&self) -> &SystemState
pub fn system_state(&self) -> &SystemState
Returns the value of system_state
, or the default value if system_state
is unset.
Sourcepub fn system_state_opt_mut(&mut self) -> Option<&mut SystemState>
pub fn system_state_opt_mut(&mut self) -> Option<&mut SystemState>
Sourcepub fn system_state_mut(&mut self) -> &mut SystemState
pub fn system_state_mut(&mut self) -> &mut SystemState
Returns a mutable reference to system_state
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn system_state_opt(&self) -> Option<&SystemState>
pub fn system_state_opt(&self) -> Option<&SystemState>
Sourcepub fn set_system_state<T: Into<SystemState>>(&mut self, field: T)
pub fn set_system_state<T: Into<SystemState>>(&mut self, field: T)
Sets system_state
with the provided value.
Sourcepub fn with_system_state<T: Into<SystemState>>(self, field: T) -> Self
pub fn with_system_state<T: Into<SystemState>>(self, field: T) -> Self
Sets system_state
with the provided value.
Sourcepub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64>
pub fn first_checkpoint_opt_mut(&mut self) -> Option<&mut u64>
Sourcepub fn first_checkpoint_mut(&mut self) -> &mut u64
pub fn first_checkpoint_mut(&mut self) -> &mut u64
Returns a mutable reference to first_checkpoint
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn first_checkpoint_opt(&self) -> Option<u64>
pub fn first_checkpoint_opt(&self) -> Option<u64>
Sourcepub fn set_first_checkpoint<T: Into<u64>>(&mut self, field: T)
pub fn set_first_checkpoint<T: Into<u64>>(&mut self, field: T)
Sets first_checkpoint
with the provided value.
Sourcepub fn with_first_checkpoint<T: Into<u64>>(self, field: T) -> Self
pub fn with_first_checkpoint<T: Into<u64>>(self, field: T) -> Self
Sets first_checkpoint
with the provided value.
Sourcepub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64>
pub fn last_checkpoint_opt_mut(&mut self) -> Option<&mut u64>
Sourcepub fn last_checkpoint_mut(&mut self) -> &mut u64
pub fn last_checkpoint_mut(&mut self) -> &mut u64
Returns a mutable reference to last_checkpoint
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn last_checkpoint_opt(&self) -> Option<u64>
pub fn last_checkpoint_opt(&self) -> Option<u64>
Sourcepub fn set_last_checkpoint<T: Into<u64>>(&mut self, field: T)
pub fn set_last_checkpoint<T: Into<u64>>(&mut self, field: T)
Sets last_checkpoint
with the provided value.
Sourcepub fn with_last_checkpoint<T: Into<u64>>(self, field: T) -> Self
pub fn with_last_checkpoint<T: Into<u64>>(self, field: T) -> Self
Sets last_checkpoint
with the provided value.
Sourcepub fn start_opt_mut(&mut self) -> Option<&mut Timestamp>
pub fn start_opt_mut(&mut self) -> Option<&mut Timestamp>
Sourcepub fn start_mut(&mut self) -> &mut Timestamp
pub fn start_mut(&mut self) -> &mut Timestamp
Returns a mutable reference to start
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn with_start<T: Into<Timestamp>>(self, field: T) -> Self
pub fn with_start<T: Into<Timestamp>>(self, field: T) -> Self
Sets start
with the provided value.
Sourcepub fn end_opt_mut(&mut self) -> Option<&mut Timestamp>
pub fn end_opt_mut(&mut self) -> Option<&mut Timestamp>
Sourcepub fn end_mut(&mut self) -> &mut Timestamp
pub fn end_mut(&mut self) -> &mut Timestamp
Returns a mutable reference to end
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64>
pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64>
Sourcepub fn reference_gas_price_mut(&mut self) -> &mut u64
pub fn reference_gas_price_mut(&mut self) -> &mut u64
Returns a mutable reference to reference_gas_price
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn reference_gas_price_opt(&self) -> Option<u64>
pub fn reference_gas_price_opt(&self) -> Option<u64>
Sourcepub fn set_reference_gas_price<T: Into<u64>>(&mut self, field: T)
pub fn set_reference_gas_price<T: Into<u64>>(&mut self, field: T)
Sets reference_gas_price
with the provided value.
Sourcepub fn with_reference_gas_price<T: Into<u64>>(self, field: T) -> Self
pub fn with_reference_gas_price<T: Into<u64>>(self, field: T) -> Self
Sets reference_gas_price
with the provided value.
Sourcepub fn protocol_config(&self) -> &ProtocolConfig
pub fn protocol_config(&self) -> &ProtocolConfig
Returns the value of protocol_config
, or the default value if protocol_config
is unset.
Sourcepub fn protocol_config_opt_mut(&mut self) -> Option<&mut ProtocolConfig>
pub fn protocol_config_opt_mut(&mut self) -> Option<&mut ProtocolConfig>
Sourcepub fn protocol_config_mut(&mut self) -> &mut ProtocolConfig
pub fn protocol_config_mut(&mut self) -> &mut ProtocolConfig
Returns a mutable reference to protocol_config
.
If the field is unset, it is first initialized with the default value.
Sourcepub fn protocol_config_opt(&self) -> Option<&ProtocolConfig>
pub fn protocol_config_opt(&self) -> Option<&ProtocolConfig>
Sourcepub fn set_protocol_config<T: Into<ProtocolConfig>>(&mut self, field: T)
pub fn set_protocol_config<T: Into<ProtocolConfig>>(&mut self, field: T)
Sets protocol_config
with the provided value.
Sourcepub fn with_protocol_config<T: Into<ProtocolConfig>>(self, field: T) -> Self
pub fn with_protocol_config<T: Into<ProtocolConfig>>(self, field: T) -> Self
Sets protocol_config
with the provided value.
Source§impl Epoch
impl Epoch
Sourcepub fn first_checkpoint(&self) -> u64
pub fn first_checkpoint(&self) -> u64
Returns the value of first_checkpoint
, or the default value if first_checkpoint
is unset.
Sourcepub fn last_checkpoint(&self) -> u64
pub fn last_checkpoint(&self) -> u64
Returns the value of last_checkpoint
, or the default value if last_checkpoint
is unset.
Sourcepub fn reference_gas_price(&self) -> u64
pub fn reference_gas_price(&self) -> u64
Returns the value of reference_gas_price
, or the default value if reference_gas_price
is unset.
Trait Implementations§
§impl<'de> Deserialize<'de> for Epoch
impl<'de> Deserialize<'de> for Epoch
§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 Merge<&Epoch> for Epoch
impl Merge<&Epoch> for Epoch
fn merge(&mut self, source: &Epoch, mask: &FieldMaskTree)
fn merge_from(source: T, mask: &FieldMaskTree) -> Selfwhere
Self: Default,
Source§impl Message for Epoch
impl Message for Epoch
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 Epoch
impl MessageFields for Epoch
const FIELDS: &'static [&'static MessageField]
impl StructuralPartialEq for Epoch
Auto Trait Implementations§
impl Freeze for Epoch
impl RefUnwindSafe for Epoch
impl Send for Epoch
impl Sync for Epoch
impl Unpin for Epoch
impl UnwindSafe for Epoch
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.