Trait salvo_proxy::Client

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

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

Client trait.

Required Associated Types§

source

type Error: StdError + Send + Sync + 'static

Error type.

Required Methods§

source

fn execute( &self, req: Request<ReqBody>, upgraded: Option<OnUpgrade>, ) -> impl Future<Output = Result<Response<ResBody>, Self::Error>> + Send

Elect a upstream to process current request.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Client for HyperClient

Available on crate feature hyper-client only.
source§

impl Client for ReqwestClient

Available on crate feature reqwest-client only.