pub trait ApiRequest {
type Output: DeserializeOwned;
// Required method
fn send(&self) -> impl Future<Output = ApiResponse<Self::Output>> + Send;
}
Expand description
Trait for implementing API requests.
This trait defines the interface for all API requests. It requires implementing
the Output
associated type and the send
method.
Required Associated Types§
Sourcetype Output: DeserializeOwned
type Output: DeserializeOwned
The type of the response to deserialize to.
Required Methods§
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.