#[non_exhaustive]pub enum Proto {
Http,
Https,
}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.
Trait Implementations§
impl Copy for Proto
impl Eq for Proto
impl StructuralPartialEq for Proto
Auto Trait Implementations§
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