Trait fedimint_core::api::FederationApiExt
source · pub trait FederationApiExt: IFederationApi {
// Provided methods
fn request_with_strategy<'life0, 'async_trait, PeerRet, FedRet>(
&'life0 self,
strategy: impl 'async_trait + QueryStrategy<PeerRet, FedRet> + MaybeSend,
method: String,
params: ApiRequestErased
) -> Pin<Box<dyn Future<Output = FederationResult<FedRet>> + Send + 'async_trait>>
where PeerRet: 'async_trait + DeserializeOwned,
FedRet: 'async_trait + Debug,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn request_current_consensus<'life0, 'async_trait, Ret>(
&'life0 self,
method: String,
params: ApiRequestErased
) -> Pin<Box<dyn Future<Output = FederationResult<Ret>> + Send + 'async_trait>>
where Ret: DeserializeOwned + Eq + Debug + Clone + MaybeSend + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
An extension trait allowing to making federation-wide API call on top
IFederationApi
.
Provided Methods§
sourcefn request_with_strategy<'life0, 'async_trait, PeerRet, FedRet>(
&'life0 self,
strategy: impl 'async_trait + QueryStrategy<PeerRet, FedRet> + MaybeSend,
method: String,
params: ApiRequestErased
) -> Pin<Box<dyn Future<Output = FederationResult<FedRet>> + Send + 'async_trait>>where
PeerRet: 'async_trait + DeserializeOwned,
FedRet: 'async_trait + Debug,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn request_with_strategy<'life0, 'async_trait, PeerRet, FedRet>(
&'life0 self,
strategy: impl 'async_trait + QueryStrategy<PeerRet, FedRet> + MaybeSend,
method: String,
params: ApiRequestErased
) -> Pin<Box<dyn Future<Output = FederationResult<FedRet>> + Send + 'async_trait>>where
PeerRet: 'async_trait + DeserializeOwned,
FedRet: 'async_trait + Debug,
Self: Sync + 'async_trait,
'life0: 'async_trait,
Make an aggregate request to federation, using strategy
to logically
merge the responses.
fn request_current_consensus<'life0, 'async_trait, Ret>( &'life0 self, method: String, params: ApiRequestErased ) -> Pin<Box<dyn Future<Output = FederationResult<Ret>> + Send + 'async_trait>>
Object Safety§
This trait is not object safe.