pub struct Connected { /* private fields */ }
Expand description

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

Create new Connected type with empty metadata.

Set 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.1

Default is false.

Set extra connection information to be set in the extensions of every Response.

Set that the connected transport negotiated HTTP/2 as it’s next protocol.

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.

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.