pub trait Client: Sync + Send {
// Required methods
fn send<'life0, 'async_trait>(
&'life0 self,
req: Request<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn base(&self) -> &str;
// Provided method
fn execute<'life0, 'async_trait>(
&'life0 self,
req: Request<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, ClientError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Required Methods§
sourcefn send<'life0, 'async_trait>(
&'life0 self,
req: Request<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
req: Request<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<u8>>, ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends the given Request and returns a Response. Implementations should consolidate all errors into the ClientError type.