pub trait Executor: Sized {
type Error: From<Error> + From<ApiError> + Send;
// Required method
fn execute<R>(
self,
request: R,
) -> impl Future<Output = (R::Discriminant, Result<ApiResponse, Self::Error>)> + Send
where R: IntoRequest;
// Provided method
fn fetch<R>(
self,
request: R,
) -> impl Future<Output = Result<R::Response, Self::Error>> + Send
where R: IntoRequest { ... }
}
Expand description
Central trait of the crate that is used to execute api requests.
Required Associated Types§
Required Methods§
Sourcefn execute<R>(
self,
request: R,
) -> impl Future<Output = (R::Discriminant, Result<ApiResponse, Self::Error>)> + Sendwhere
R: IntoRequest,
fn execute<R>(
self,
request: R,
) -> impl Future<Output = (R::Discriminant, Result<ApiResponse, Self::Error>)> + Sendwhere
R: IntoRequest,
Execute an api request.
Provided 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.