Skip to main content

Client

Trait Client 

Source
pub trait Client {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn execute(
        &self,
        req: Request<Bytes>,
    ) -> impl Future<Output = Result<Response<Bytes>, Self::Error>> + Send;
}
Expand description

A trait representing a client which can communicate with a Lettermint instance.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn execute( &self, req: Request<Bytes>, ) -> impl Future<Output = Result<Response<Bytes>, Self::Error>> + Send

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§