Trait TargetHttpVersionInputExt
pub trait TargetHttpVersionInputExt {
// Required method
fn target_http_version(&self) -> Option<Version>;
// Provided method
fn target_http_version_with_fallback(
&self,
fallback: Option<Version>,
) -> Option<Version> { ... }
}Available on crate feature
net only.Expand description
Read the target HTTP Version a connector should establish.
This is deliberately separate from HttpVersionInputExt, which may
resolve the original client version from forwarded request context. A
connector needs the selected egress version instead.
Required Methods§
fn target_http_version(&self) -> Option<Version>
fn target_http_version(&self) -> Option<Version>
The selected egress HTTP version, or None if none is available.
Provided Methods§
fn target_http_version_with_fallback(
&self,
fallback: Option<Version>,
) -> Option<Version>
fn target_http_version_with_fallback( &self, fallback: Option<Version>, ) -> Option<Version>
Resolve the selected egress HTTP version with a post-negotiation fallback.
Implementations that can distinguish an explicit target from an
implicit input version should override this method so fallback is
considered between those two sources.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
§impl<T> TargetHttpVersionInputExt for &Twhere
T: TargetHttpVersionInputExt + ?Sized,
Available on crate feature http only.
impl<T> TargetHttpVersionInputExt for &Twhere
T: TargetHttpVersionInputExt + ?Sized,
Available on crate feature
http only.fn target_http_version(&self) -> Option<Version>
fn target_http_version_with_fallback( &self, fallback: Option<Version>, ) -> Option<Version>
Implementors§
impl TargetHttpVersionInputExt for ConnectRequest
Available on crate feature
http only.