Struct Connected
struct Connected { ... }
Extra information about the connected transport.
This can be used to inform recipients about things like if ALPN was used, or if connected to an HTTP proxy.
Implementations
impl Connected
fn new() -> ConnectedCreate new
Connectedtype with empty metadata.fn proxy(self: Self, is_proxied: bool) -> ConnectedSet whether the connected transport is to an HTTP proxy.
This setting will affect if HTTP/1 requests written on the transport will have the request-target in absolute-form or origin-form:
- When
proxy(false):
GET /guide HTTP/1.1- When
proxy(true):
GET http://hyper.rs/guide HTTP/1.1Default is
false.- When
fn is_proxied(self: &Self) -> boolDetermines if the connected transport is to an HTTP proxy.
fn extra<T: Clone + Send + Sync + 'static>(self: Self, extra: T) -> ConnectedSet extra connection information to be set in the extensions of every
Response.fn get_extras(self: &Self, extensions: &mut Extensions)Copies the extra connection information into an
Extensionsmap.fn negotiated_h2(self: Self) -> ConnectedSet that the connected transport negotiated HTTP/2 as its next protocol.
fn is_negotiated_h2(self: &Self) -> boolDetermines if the connected transport negotiated HTTP/2 as its next protocol.
fn poison(self: &Self)Poison this connection
A poisoned connection will not be reused for subsequent requests by the pool
impl Debug for Connected
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Freeze for Connected
impl RefUnwindSafe for Connected
impl Send for Connected
impl Sync for Connected
impl Unpin for Connected
impl UnsafeUnpin for Connected
impl UnwindSafe for Connected
impl<T> Any for Connected
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Connected
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Connected
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Connected
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Connected
impl<T> WithSubscriber for Connected
impl<T, U> Into for Connected
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 Connected
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Connected
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>