pub trait FederationApiExt: IRawFederationApi {
// Provided methods
fn request_single_peer<'life0, 'async_trait, Ret>(
&'life0 self,
method: String,
params: ApiRequestErased,
peer: PeerId,
) -> Pin<Box<dyn Future<Output = PeerResult<Ret>> + Send + 'async_trait>>
where Ret: DeserializeOwned + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn request_single_peer_federation<'life0, 'async_trait, FedRet>(
&'life0 self,
method: String,
params: ApiRequestErased,
peer_id: PeerId,
) -> Pin<Box<dyn Future<Output = FederationResult<FedRet>> + Send + 'async_trait>>
where FedRet: DeserializeOwned + Eq + Debug + Clone + MaybeSend + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn request_with_strategy<'life0, 'async_trait, PR, FR>(
&'life0 self,
strategy: impl 'async_trait + QueryStrategy<PR, FR> + MaybeSend,
method: String,
params: ApiRequestErased,
) -> Pin<Box<dyn Future<Output = FederationResult<FR>> + Send + 'async_trait>>
where PR: 'async_trait + DeserializeOwned,
FR: 'async_trait + Debug,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn request_with_strategy_retry<'life0, 'async_trait, PR, FR>(
&'life0 self,
strategy: impl 'async_trait + QueryStrategy<PR, FR> + MaybeSend,
method: String,
params: ApiRequestErased,
) -> Pin<Box<dyn Future<Output = FR> + Send + 'async_trait>>
where PR: 'async_trait + DeserializeOwned + MaybeSend,
FR: '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 { ... }
fn request_current_consensus_retry<'life0, 'async_trait, Ret>(
&'life0 self,
method: String,
params: ApiRequestErased,
) -> Pin<Box<dyn Future<Output = Ret> + Send + 'async_trait>>
where Ret: DeserializeOwned + Eq + Debug + Clone + MaybeSend + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn request_admin<'life0, 'life1, 'async_trait, Ret>(
&'life0 self,
method: &'life1 str,
params: ApiRequestErased,
auth: ApiAuth,
) -> 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,
'life1: 'async_trait { ... }
fn request_admin_no_auth<'life0, 'life1, 'async_trait, Ret>(
&'life0 self,
method: &'life1 str,
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,
'life1: 'async_trait { ... }
}
Expand description
An extension trait allowing to making federation-wide API call on top
IRawFederationApi
.
Provided Methods§
fn request_single_peer<'life0, 'async_trait, Ret>(
&'life0 self,
method: String,
params: ApiRequestErased,
peer: PeerId,
) -> Pin<Box<dyn Future<Output = PeerResult<Ret>> + Send + 'async_trait>>where
Ret: DeserializeOwned + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn request_single_peer_federation<'life0, 'async_trait, FedRet>( &'life0 self, method: String, params: ApiRequestErased, peer_id: PeerId, ) -> Pin<Box<dyn Future<Output = FederationResult<FedRet>> + Send + 'async_trait>>
Sourcefn request_with_strategy<'life0, 'async_trait, PR, FR>(
&'life0 self,
strategy: impl 'async_trait + QueryStrategy<PR, FR> + MaybeSend,
method: String,
params: ApiRequestErased,
) -> Pin<Box<dyn Future<Output = FederationResult<FR>> + Send + 'async_trait>>where
PR: 'async_trait + DeserializeOwned,
FR: 'async_trait + Debug,
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn request_with_strategy<'life0, 'async_trait, PR, FR>(
&'life0 self,
strategy: impl 'async_trait + QueryStrategy<PR, FR> + MaybeSend,
method: String,
params: ApiRequestErased,
) -> Pin<Box<dyn Future<Output = FederationResult<FR>> + Send + 'async_trait>>where
PR: 'async_trait + DeserializeOwned,
FR: '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_with_strategy_retry<'life0, 'async_trait, PR, FR>(
&'life0 self,
strategy: impl 'async_trait + QueryStrategy<PR, FR> + MaybeSend,
method: String,
params: ApiRequestErased,
) -> Pin<Box<dyn Future<Output = FR> + Send + 'async_trait>>where
PR: 'async_trait + DeserializeOwned + MaybeSend,
FR: '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>>
fn request_current_consensus_retry<'life0, 'async_trait, Ret>( &'life0 self, method: String, params: ApiRequestErased, ) -> Pin<Box<dyn Future<Output = Ret> + Send + 'async_trait>>
fn request_admin<'life0, 'life1, 'async_trait, Ret>( &'life0 self, method: &'life1 str, params: ApiRequestErased, auth: ApiAuth, ) -> Pin<Box<dyn Future<Output = FederationResult<Ret>> + Send + 'async_trait>>
fn request_admin_no_auth<'life0, 'life1, 'async_trait, Ret>( &'life0 self, method: &'life1 str, params: ApiRequestErased, ) -> Pin<Box<dyn Future<Output = FederationResult<Ret>> + Send + 'async_trait>>
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.