pub enum HttpVersion {
HTTP1_1,
HTTP2,
Unknown(String),
}
Expand description
Represents the HTTP version used in the request or response.
This enum is used to specify the HTTP version for HTTP requests and responses.
It supports the two most common HTTP versions: HTTP/1.1 and HTTP/2. The HttpVersion
enum allows for easy comparison, cloning, and debugging of the HTTP version.
The variants include:
HTTP1_1
: Represents HTTP version 1.1.HTTP2
: Represents HTTP version 2.0.
Variants§
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
Source§impl Default for HttpVersion
impl Default for HttpVersion
Source§impl Display for HttpVersion
impl Display 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