[][src]Trait twitter_client::traits::HttpService

pub trait HttpService<B>: Sealed<B> {
    type ResponseBody: Body;
    type Error;
    type Future: Future<Output = Result<Response<Self::ResponseBody>, Self::Error>>;
    pub fn poll_ready(
        &mut self,
        cx: &mut Context<'_>
    ) -> Poll<Result<(), Self::Error>>;
pub fn call(&mut self, request: Request<B>) -> Self::Future; }

An HTTP client (like hyper::Client).

This is just an alias for tower_service::Service introduced to reduce the number of type parameters.

Associated Types

type ResponseBody: Body[src]

Body of the responses given by the service.

type Error[src]

type Future: Future<Output = Result<Response<Self::ResponseBody>, Self::Error>>[src]

Loading content...

Required methods

pub fn poll_ready(
    &mut self,
    cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>
[src]

pub fn call(&mut self, request: Request<B>) -> Self::Future[src]

Loading content...

Implementors

impl<S: ?Sized, ReqB, ResB> HttpService<ReqB> for S where
    S: Service<Request<ReqB>, Response = Response<ResB>>,
    ResB: Body
[src]

type ResponseBody = ResB

type Error = S::Error

type Future = S::Future

Loading content...