Struct salvo::hyper::client::connect::Connected [−]
pub struct Connected { /* fields omitted */ }
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
impl Connected
impl Connected
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
.
pub fn is_proxied(&self) -> bool
pub fn is_proxied(&self) -> bool
Determines if the connected transport is to an HTTP proxy.
Set extra connection information to be set in the extensions of every Response
.
pub fn get_extras(&self, extensions: &mut Extensions)
pub fn get_extras(&self, extensions: &mut Extensions)
Copies the extra connection information into an Extensions
map.
pub fn negotiated_h2(self) -> Connected
pub fn negotiated_h2(self) -> Connected
Set that the connected transport negotiated HTTP/2 as its next protocol.
pub fn is_negotiated_h2(&self) -> bool
pub fn is_negotiated_h2(&self) -> bool
Determines if the connected transport negotiated HTTP/2 as its next protocol.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Connected
impl !UnwindSafe for Connected
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
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