pub trait Transport: Sync {
// Required method
fn send(
&self,
request: ApiRequest,
) -> impl Future<Output = Result<ApiResponse, ClientError>> + Send;
// Provided method
fn open(
&self,
path: String,
) -> impl Future<Output = Result<Chunks, ClientError>> + Send { ... }
}Expand description
Sends requests to the API.
Required Methods§
Sourcefn send(
&self,
request: ApiRequest,
) -> impl Future<Output = Result<ApiResponse, ClientError>> + Send
fn send( &self, request: ApiRequest, ) -> impl Future<Output = Result<ApiResponse, ClientError>> + Send
Sends one request.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".