pub trait FetchCurrent: Sized {
    // Required methods
    fn fetch_current<'life0, 'async_trait>(
        sdk: &'life0 Sdk,
    ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fetch_current_with_metadata<'life0, 'async_trait>(
        sdk: &'life0 Sdk,
    ) -> Pin<Box<dyn Future<Output = Result<(Self, ResponseMetadata), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fetch_current_with_metadata_and_proof<'life0, 'async_trait>(
        sdk: &'life0 Sdk,
    ) -> Pin<Box<dyn Future<Output = Result<(Self, ResponseMetadata, Proof), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Helper trait for managing Epoch information

Required Methods§

source

fn fetch_current<'life0, 'async_trait>( sdk: &'life0 Sdk, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch current (the latest) epoch from Platform.

source

fn fetch_current_with_metadata<'life0, 'async_trait>( sdk: &'life0 Sdk, ) -> Pin<Box<dyn Future<Output = Result<(Self, ResponseMetadata), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch current (the latest) epoch from Platform with metadata.

source

fn fetch_current_with_metadata_and_proof<'life0, 'async_trait>( sdk: &'life0 Sdk, ) -> Pin<Box<dyn Future<Output = Result<(Self, ResponseMetadata, Proof), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch current (the latest) epoch from Platform with metadata and proof.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FetchCurrent for ExtendedEpochInfo

source§

fn fetch_current<'life0, 'async_trait>( sdk: &'life0 Sdk, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn fetch_current_with_metadata<'life0, 'async_trait>( sdk: &'life0 Sdk, ) -> Pin<Box<dyn Future<Output = Result<(Self, ResponseMetadata), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn fetch_current_with_metadata_and_proof<'life0, 'async_trait>( sdk: &'life0 Sdk, ) -> Pin<Box<dyn Future<Output = Result<(Self, ResponseMetadata, Proof), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

impl FetchCurrent for TotalCreditsInPlatform

source§

fn fetch_current<'life0, 'async_trait>( sdk: &'life0 Sdk, ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn fetch_current_with_metadata<'life0, 'async_trait>( sdk: &'life0 Sdk, ) -> Pin<Box<dyn Future<Output = Result<(Self, ResponseMetadata), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn fetch_current_with_metadata_and_proof<'life0, 'async_trait>( sdk: &'life0 Sdk, ) -> Pin<Box<dyn Future<Output = Result<(Self, ResponseMetadata, Proof), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§