[−][src]Struct isahc::config::VersionNegotiation
A strategy for selecting what HTTP versions should be used when communicating with a server.
Methods
impl VersionNegotiation
[src]
pub const fn latest_compatible() -> Self
[src]
Always prefer the latest supported version with a preference for old versions if necessary in order to connect. This is the default.
Typically negotiation will begin with an HTTP/1.1 request, upgrading to HTTP/2 if possible, then to HTTP/3 if possible, etc.
pub const fn http10() -> Self
[src]
Connect via HTTP/1.0 and do not attempt to use a higher version.
pub const fn http11() -> Self
[src]
Connect via HTTP/1.1 and do not attempt to use a higher version.
pub const fn http2() -> Self
[src]
Connect via HTTP/2. Failure to connect will not fall back to old versions, unless HTTP/1.1 is negotiated via TLS ALPN before the session begins.
If HTTP/2 support is not compiled in, then using this strategy will always result in an error.
This strategy is often referred to as HTTP/2 with Prior Knowledge.
Trait Implementations
impl Clone for VersionNegotiation
[src]
fn clone(&self) -> VersionNegotiation
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for VersionNegotiation
[src]
impl Debug for VersionNegotiation
[src]
Auto Trait Implementations
impl Send for VersionNegotiation
impl Sync for VersionNegotiation
impl Unpin for VersionNegotiation
impl UnwindSafe for VersionNegotiation
impl RefUnwindSafe for VersionNegotiation
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,