Trait Executor

Source
pub trait Executor {
    type Error: From<Error> + From<ApiError> + Send;

    // Required method
    fn execute<R>(
        &self,
        request: R,
    ) -> impl Future<Output = Result<ApiResponse<R::Discriminant>, 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 { ... }
}

Required Associated Types§

Required Methods§

Source

fn execute<R>( &self, request: R, ) -> impl Future<Output = Result<ApiResponse<R::Discriminant>, Self::Error>> + Send
where R: IntoRequest,

Provided Methods§

Source

fn fetch<R>( &self, request: R, ) -> impl Future<Output = Result<R::Response, Self::Error>> + Send
where R: IntoRequest,

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.

Implementors§