Trait atrium_xrpc::XrpcClient
source · pub trait XrpcClient: HttpClient {
// Required method
fn base_uri(&self) -> String;
// Provided methods
fn auth<'life0, 'async_trait>(
&'life0 self,
is_refresh: bool
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn send_xrpc<'life0, 'life1, 'async_trait, P, I, O, E>(
&'life0 self,
request: &'life1 XrpcRequest<P, I>
) -> Pin<Box<dyn Future<Output = XrpcResult<O, E>> + Send + 'async_trait>>
where P: Serialize + Send + Sync + 'async_trait,
I: Serialize + Send + Sync + 'async_trait,
O: DeserializeOwned + Send + Sync + 'async_trait,
E: DeserializeOwned + Send + Sync + 'async_trait,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Expand description
An abstract XRPC client.
send_xrpc()
method has a default implementation,
which wraps the HttpClient::send_http()
` method to handle input and output as an XRPC Request.
Required Methods§
Provided Methods§
fn auth<'life0, 'async_trait>(
&'life0 self,
is_refresh: bool
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn send_xrpc<'life0, 'life1, 'async_trait, P, I, O, E>( &'life0 self, request: &'life1 XrpcRequest<P, I> ) -> Pin<Box<dyn Future<Output = XrpcResult<O, E>> + Send + 'async_trait>>
Object Safety§
This trait is not object safe.