Trait penumbra_sct::component::clock::EpochRead
source · 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_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_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_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
) -> 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.
Object Safety§
This trait is not object safe.