Epocher

Trait Epocher 

Source
pub trait Epocher:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn containing(&self, height: u64) -> Option<EpochInfo>;
    fn first(&self, epoch: Epoch) -> Option<u64>;
    fn last(&self, epoch: Epoch) -> Option<u64>;
}
Expand description

Mechanism for determining epoch boundaries.

Required Methods§

Source

fn containing(&self, height: u64) -> Option<EpochInfo>

Returns the information about an epoch containing the given block height.

Returns None if the height is not supported.

Source

fn first(&self, epoch: Epoch) -> Option<u64>

Returns the first block height in the given epoch.

Returns None if the epoch is not supported.

Source

fn last(&self, epoch: Epoch) -> Option<u64>

Returns the last block height in the given epoch.

Returns None if the epoch is not supported.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§