pub trait EpochRead: StateRead {
// Provided methods
fn get_block_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn get_current_block_timestamp<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Time>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn get_block_timestamp<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Time>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn get_current_epoch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Epoch>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn get_epoch_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Epoch>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn is_epoch_ending_early<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Available on crate feature
component
only.Expand description
Provides read access to epoch indices, block heights, timestamps, and other related data.
Provided Methods§
Sourcefn get_block_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_block_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Sourcefn get_current_block_timestamp<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Time>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_current_block_timestamp<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Time>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Sourcefn get_block_timestamp<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Time>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_block_timestamp<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Time>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Sourcefn get_current_epoch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Epoch>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_current_epoch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Epoch>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Sourcefn get_epoch_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Epoch>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn get_epoch_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Epoch>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Get the epoch corresponding to the supplied height.
§Errors
Returns an error if the epoch is missing.
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.