Struct SendRequest
struct SendRequest<B> { ... }
The sender side of an established connection.
Implementations
impl<B> SendRequest<B>
fn poll_ready(self: &mut Self, _cx: &mut Context<'_>) -> Poll<crate::Result<()>>Polls to determine whether this sender can be used yet for a request.
If the associated connection is closed, this returns an Error.
async fn ready(self: &mut Self) -> crate::Result<()>Waits until the dispatcher is ready
If the associated connection is closed, this returns an Error.
fn is_ready(self: &Self) -> boolChecks if the connection is currently ready to send a request.
Note
This is mostly a hint. Due to inherent latency of networks, it is possible that even after checking this is ready, sending a request may still fail because the connection was closed in the meantime.
fn is_closed(self: &Self) -> boolChecks if the connection side has been closed.
impl<B> SendRequest<B>
fn send_request(self: &mut Self, req: Request<B>) -> impl Future<Output = crate::Result<Response<IncomingBody>>>Sends a
Requeston the associated connection.Returns a future that if successful, yields the
Response.reqmust have aHostheader.Absolute-form
Uris are not required. If received, they will be serialized as-is.fn try_send_request(self: &mut Self, req: Request<B>) -> impl Future<Output = Result<Response<IncomingBody>, TrySendError<Request<B>>>>Sends a
Requeston the associated connection.Returns a future that if successful, yields the
Response.Error
If there was an error before trying to serialize the request to the connection, the message will be returned as part of this error.
impl<B> Clone for SendRequest<B>
fn clone(self: &Self) -> SendRequest<B>
impl<B> Debug for SendRequest<B>
fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result
impl<B> Freeze for SendRequest<B>
impl<B> RefUnwindSafe for SendRequest<B>
impl<B> Send for SendRequest<B>
impl<B> Sync for SendRequest<B>
impl<B> Unpin for SendRequest<B>
impl<B> UnwindSafe for SendRequest<B>
impl<T> Any for SendRequest<B>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for SendRequest<B>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for SendRequest<B>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for SendRequest<B>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for SendRequest<B>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for SendRequest<B>
impl<T> ToOwned for SendRequest<B>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> WithSubscriber for SendRequest<B>
impl<T, U> Into for SendRequest<B>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for SendRequest<B>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for SendRequest<B>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>