#[non_exhaustive]pub enum Version {
Http10,
Http11,
}Expand description
The HTTP version of a message.
§Examples
use http_net::Version;
assert_eq!(Version::Http11.as_str(), "HTTP/1.1");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.
Http10
HTTP/1.0: no chunked encoding, keep-alive only when asked for.
Http11
HTTP/1.1 (also used for HTTP/1.2 through 1.9, which RFC 9110 section 2.5 says to process as the highest implemented minor version).
Implementations§
Trait Implementations§
impl Copy for Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnsafeUnpin for Version
impl UnwindSafe for Version
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