Trait salvo_proxy::Client

source ·
pub trait Client: Send + Sync + 'static {
    type Error: StdError + Send + Sync + 'static;

    // Required method
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        req: Request<ReqBody>,
        upgraded: Option<OnUpgrade>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ResBody>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Client trait.

Required Associated Types§

source

type Error: StdError + Send + Sync + 'static

Error type.

Required Methods§

source

fn execute<'life0, 'async_trait>( &'life0 self, req: Request<ReqBody>, upgraded: Option<OnUpgrade> ) -> Pin<Box<dyn Future<Output = Result<Response<ResBody>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Elect a upstream to process current request.

Implementors§