#[non_exhaustive]pub enum HttpVersion {
Http2Only,
Auto,
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Http2Only
HTTP/2 only: negotiated through TLS ALPN on https, and spoken with
prior knowledge (h2c) on http.
Every request of a client shares one multiplexed connection, including requests started together on a client that has no connection yet.
Auto
HTTP/2 or HTTP/1.1 as the server chooses through ALPN on https, and
HTTP/1.1 on http.
Use it behind a proxy that speaks HTTP/1.1 only. A client that has no connection yet may open one per request started at the same time, because which version the server speaks is known only once one of them is open.
Trait Implementations§
Source§impl Clone for HttpVersion
impl Clone for HttpVersion
impl Copy for HttpVersion
Source§impl Debug for HttpVersion
impl Debug for HttpVersion
impl Eq for HttpVersion
Source§impl Hash for HttpVersion
impl Hash for HttpVersion
Source§impl PartialEq for HttpVersion
impl PartialEq for HttpVersion
impl StructuralPartialEq for HttpVersion
Auto Trait Implementations§
impl Freeze for HttpVersion
impl RefUnwindSafe for HttpVersion
impl Send for HttpVersion
impl Sync for HttpVersion
impl Unpin for HttpVersion
impl UnsafeUnpin for HttpVersion
impl UnwindSafe for HttpVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.