#[non_exhaustive]pub enum Protocol {
Http1,
Http2,
Grpc,
}Expand description
The wire protocol a request arrived on (or is sent upstream on).
#[non_exhaustive] so additional protocols are additive. M1 implements
Protocol::Http1 only; HTTP/2 and gRPC arrive in M4 (docs/11).
§Examples
use osproxy_spi::Protocol;
let ingress = Protocol::Http2;
assert!(matches!(ingress, Protocol::Http2));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 Protocol
impl Eq for Protocol
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnsafeUnpin for Protocol
impl UnwindSafe for Protocol
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