pub struct Connect<C, B, T> { /* private fields */ }
Expand description
Creates a connection via SendRequest
.
This accepts a hyper::client::conn::Builder
and provides
a MakeService
implementation to create connections from some
target T
.
Implementations
Trait Implementations
sourceimpl<C, B, T> Service<T> for Connect<C, B, T>where
C: MakeConnection<T>,
C::Connection: Unpin + Send + 'static,
C::Future: Send + 'static,
C::Error: Into<Box<dyn StdError + Send + Sync>> + Send,
B: HttpBody + Unpin + Send + 'static,
B::Data: Send + Unpin,
B::Error: Into<Box<dyn StdError + Send + Sync>>,
impl<C, B, T> Service<T> for Connect<C, B, T>where
C: MakeConnection<T>,
C::Connection: Unpin + Send + 'static,
C::Future: Send + 'static,
C::Error: Into<Box<dyn StdError + Send + Sync>> + Send,
B: HttpBody + Unpin + Send + 'static,
B::Data: Send + Unpin,
B::Error: Into<Box<dyn StdError + Send + Sync>>,
type Response = SendRequest<B>
type Response = SendRequest<B>
Responses given by the service.
type Future = Pin<Box<dyn Future<Output = Result<<Connect<C, B, T> as Service<T>>::Response, <Connect<C, B, T> as Service<T>>::Error>> + Send + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<Connect<C, B, T> as Service<T>>::Response, <Connect<C, B, T> as Service<T>>::Error>> + Send + 'static, Global>>
The future response value.
sourcefn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Poll::Ready(Ok(()))
when the service is able to process requests. Read moreAuto Trait Implementations
impl<C, B, T> !RefUnwindSafe for Connect<C, B, T>
impl<C, B, T> Send for Connect<C, B, T>where
C: Send,
impl<C, B, T> Sync for Connect<C, B, T>where
C: Sync,
impl<C, B, T> Unpin for Connect<C, B, T>where
C: Unpin,
impl<C, B, T> !UnwindSafe for Connect<C, B, T>
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more