penumbra_sct::component::sct

Trait StateReadExt

Source
pub trait StateReadExt: StateRead {
    // Provided methods
    fn get_sct_params<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<SctParameters>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn get_epoch_duration_parameter<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Available on crate feature component only.
Expand description

This trait provides read access to configuration data for the component.

Provided Methods§

Source

fn get_sct_params<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SctParameters>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Gets the SCT parameters from the state.

Source

fn get_epoch_duration_parameter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Fetch the epoch duration parameter (measured in blocks).

§Errors

Returns an error if the Sct parameters are 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.

Implementors§