#[non_exhaustive]pub enum HttpVersion {
Any = 0,
V10 = 1,
V11 = 2,
V2 = 3,
V2TLS = 4,
V2PriorKnowledge = 5,
V3 = 30,
}
Expand description
Possible values to pass to the http_version
method.
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.
Any = 0
We don’t care what http version to use, and we’d like the library to choose the best possible for us.
V10 = 1
Please use HTTP 1.0 in the request
V11 = 2
Please use HTTP 1.1 in the request
V2 = 3
Please use HTTP 2 in the request (Added in CURL 7.33.0)
V2TLS = 4
Use version 2 for HTTPS, version 1.1 for HTTP (Added in CURL 7.47.0)
V2PriorKnowledge = 5
Please use HTTP 2 without HTTP/1.1 Upgrade (Added in CURL 7.49.0)
V3 = 30
Setting this value will make libcurl attempt to use HTTP/3 directly to server given in the URL but fallback to earlier HTTP versions if the HTTP/3 connection establishment fails.
Note: the meaning of this settings depends on the linked libcurl. For CURL < 7.88.0, there is no fallback if HTTP/3 connection fails.
(Added in CURL 7.66.0)
Trait Implementations§
Source§impl Clone for HttpVersion
impl Clone for HttpVersion
Source§fn clone(&self) -> HttpVersion
fn clone(&self) -> HttpVersion
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HttpVersion
impl Debug for HttpVersion
impl Copy 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 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