pub struct SendRequest<B> { /* private fields */ }
Available on crate feature client and (crate features http1 or http2) only.
Expand description

The sender side of an established connection.

Implementations§

Polls to determine whether this sender can be used yet for a request.

If the associated connection is closed, this returns an Error.

Waits until the dispatcher is ready

If the associated connection is closed, this returns an Error.

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-form Uris, since the scheme and authority are needed to connect. They aren’t required here.
  • Since the Client requires absolute-form Uris, it can add the Host header based on it. You must add a Host header yourself before calling this method.
  • Since absolute-form Uris are not required, if received, they will be serialized as-is.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more