Enum curl::easy::HttpVersion

source ·
#[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

source§

fn clone(&self) -> HttpVersion

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HttpVersion

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for HttpVersion

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.