pub struct EraSummary {
pub start: EraBound,
pub end: Option<EraBound>,
pub params: EraParams,
}Fields§
§start: EraBound§end: Option<EraBound>§params: EraParamsImplementations§
Source§impl EraSummary
impl EraSummary
Sourcepub fn contains_slot(
&self,
slot: &Slot,
tip: &Slot,
stability_window: &Slot,
) -> bool
pub fn contains_slot( &self, slot: &Slot, tip: &Slot, stability_window: &Slot, ) -> bool
Checks whether the current EraSummary ends after the given slot; In case
where the EraSummary doesn’t have any upper bound, then we check whether the
point is within a foreseeable horizon.
Sourcepub fn contains_slot_unchecked_horizon(&self, slot: &Slot) -> bool
pub fn contains_slot_unchecked_horizon(&self, slot: &Slot) -> bool
Like contains_slot, but doesn’t enforce anything about the upper bound. So when there’s no upper bound, the slot is simply always considered within the era.
pub fn contains_epoch( &self, epoch: &Epoch, tip: &Slot, stability_window: &Slot, ) -> bool
Sourcepub fn contains_epoch_unchecked_horizon(&self, epoch: &Epoch) -> bool
pub fn contains_epoch_unchecked_horizon(&self, epoch: &Epoch) -> bool
Like contains_epoch, but doesn’t enforce anything about the upper bound. So when there’s no upper bound, the epoch is simply always considered within the era.
Trait Implementations§
Source§impl Clone for EraSummary
impl Clone for EraSummary
Source§fn clone(&self) -> EraSummary
fn clone(&self) -> EraSummary
Returns a duplicate 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 Debug for EraSummary
impl Debug for EraSummary
Source§impl<'b, C> Decode<'b, C> for EraSummary
impl<'b, C> Decode<'b, C> for EraSummary
Source§impl<'de> Deserialize<'de> for EraSummary
impl<'de> Deserialize<'de> for EraSummary
Source§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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<C> Encode<C> for EraSummary
impl<C> Encode<C> for EraSummary
Source§impl PartialEq for EraSummary
impl PartialEq for EraSummary
Source§impl Serialize for EraSummary
impl Serialize for EraSummary
impl Eq for EraSummary
impl StructuralPartialEq for EraSummary
Auto Trait Implementations§
impl Freeze for EraSummary
impl RefUnwindSafe for EraSummary
impl Send for EraSummary
impl Sync for EraSummary
impl Unpin for EraSummary
impl UnsafeUnpin for EraSummary
impl UnwindSafe for EraSummary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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