Struct choices::warp::hyper::client::conn::SendRequest [−][src]
pub struct SendRequest<B> { /* fields omitted */ }
The sender side of an established connection.
Implementations
impl<B> SendRequest<B>
[src]
impl<B> SendRequest<B>
[src]impl<B> SendRequest<B> where
B: Body + 'static,
[src]
impl<B> SendRequest<B> where
B: Body + 'static,
[src]pub fn send_request(&mut self, req: Request<B>) -> ResponseFutureⓘNotable traits for ResponseFuture
impl Future for ResponseFuture type Output = Result<Response<Body>, Error>;
[src]
pub fn send_request(&mut self, req: Request<B>) -> ResponseFutureⓘNotable traits for ResponseFuture
impl Future for ResponseFuture type Output = Result<Response<Body>, Error>;
[src]Sends a Request
on the associated connection.
Returns a future that if successful, yields the Response
.
Note
There are some key differences in what automatic things the Client
does for you that will not be done here:
Client
requires absolute-formUri
s, since the scheme and authority are needed to connect. They aren’t required here.- Since the
Client
requires absolute-formUri
s, it can add theHost
header based on it. You must add aHost
header yourself before calling this method. - Since absolute-form
Uri
s are not required, if received, they will be serialized as-is.
Example
use hyper::Request; // build a Request let req = Request::builder() .uri("/foo/bar") .header(HOST, "hyper.rs") .body(Body::empty()) .unwrap(); // send it and await a Response let res = tx.send_request(req).await?; // assert the Response assert!(res.status().is_success());
Trait Implementations
impl<B> Debug for SendRequest<B>
[src]
impl<B> Debug for SendRequest<B>
[src]impl<B> Service<Request<B>> for SendRequest<B> where
B: Body + 'static,
[src]
impl<B> Service<Request<B>> for SendRequest<B> where
B: Body + 'static,
[src]type Future = ResponseFuture
type Future = ResponseFuture
The future response value.
Auto Trait Implementations
impl<B> !RefUnwindSafe for SendRequest<B>
impl<B> Send for SendRequest<B> where
B: Send,
B: Send,
impl<B> Sync for SendRequest<B> where
B: Send,
B: Send,
impl<B> Unpin for SendRequest<B>
impl<B> !UnwindSafe for SendRequest<B>
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,