#[non_exhaustive]pub enum Proto {
Http,
Https,
Ws,
Wss,
Other,
}Expand description
The protocol a request arrived over at the proxy.
§Examples
use parse_net::forwarded::{parse_x_forwarded_proto, Proto};
assert_eq!(parse_x_forwarded_proto(b"http")?, Proto::Http);
assert_eq!(parse_x_forwarded_proto(b"https, HTTPS")?, Proto::Https);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.
Http
http.
Https
https.
Ws
ws.
Wss
wss.
Other
Another URI scheme (RFC 7239 section 5.4 allows any). It cannot be
written back: write_element refuses it.
Trait Implementations§
impl Copy for Proto
impl Eq for Proto
impl StructuralPartialEq for Proto
Auto Trait Implementations§
impl Forget for Proto
impl Freeze for Proto
impl RefUnwindSafe for Proto
impl Send for Proto
impl Sync for Proto
impl Unpin for Proto
impl UnsafeUnpin for Proto
impl UnwindSafe for Proto
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