pub trait Request {
type Error;
// Required methods
fn request<T, U>(
&self,
method: &Method,
endpoint: &str,
payload: &T,
) -> impl Future<Output = Result<U, Self::Error>> + Send
where T: ?Sized + Serialize + Debug + Send + Sync,
U: DeserializeOwned + Debug + Send + Sync;
fn execute(
&self,
request: Request,
) -> impl Future<Output = Result<Response, Self::Error>> + Send;
}Expand description
Low-level request execution, kept for the historical surface.
Required Associated Types§
Required Methods§
fn request<T, U>( &self, method: &Method, endpoint: &str, payload: &T, ) -> impl Future<Output = Result<U, Self::Error>> + Send
fn execute( &self, request: Request, ) -> impl Future<Output = Result<Response, Self::Error>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".