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 fetching current state from Platform without query parameters.
Implemented for types that have a single “current” value on Platform, such as
the current epoch (ExtendedEpochInfo)
or total credits in platform.
Required Methods§
Sourcefn 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<'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 the current value from Platform.
Sourcefn 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<'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 the current value from Platform with metadata.
Sourcefn 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,
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 the current value from Platform with metadata and proof.
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.