pub enum HttpVersion {
HTTP0_9,
HTTP1_0,
HTTP1_1,
HTTP2,
HTTP3,
Unknown(String),
}
Expand description
Represents the HTTP version used in the request or response.
Variants§
HTTP0_9
HTTP version 0.9
HTTP1_0
HTTP version 1.0
HTTP1_1
HTTP version 1.1
HTTP2
HTTP version 2.0
HTTP3
HTTP version 3.0
Unknown(String)
Unknown version
Implementations§
Source§impl HttpVersion
impl HttpVersion
Sourcepub fn is_http0_9(&self) -> bool
pub fn is_http0_9(&self) -> bool
Checks if the current version is HTTP/0.9.
Sourcepub fn is_http1_0(&self) -> bool
pub fn is_http1_0(&self) -> bool
Checks if the current version is HTTP/1.0.
Sourcepub fn is_http1_1(&self) -> bool
pub fn is_http1_1(&self) -> bool
Checks if the current version is HTTP/1.1.
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Checks if the current version is unknown.
Sourcepub fn is_http1_1_or_higher(&self) -> bool
pub fn is_http1_1_or_higher(&self) -> bool
Checks if the current version is HTTP/1.1 or higher.
Trait Implementations§
Source§impl Clone for HttpVersion
impl Clone for HttpVersion
Source§fn clone(&self) -> HttpVersion
fn clone(&self) -> HttpVersion
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HttpVersion
impl Debug for HttpVersion
Source§impl Default for HttpVersion
impl Default for HttpVersion
Source§impl Display for HttpVersion
impl Display for HttpVersion
Source§impl FromStr for HttpVersion
impl FromStr for HttpVersion
Source§impl PartialEq for HttpVersion
impl PartialEq for HttpVersion
impl Eq 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 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