#[non_exhaustive]pub enum HeaderOp {
Add {
name: String,
value: String,
},
Remove {
name: String,
},
Replace {
name: String,
value: String,
},
}Expand description
A mutation to apply to the request headers before forwarding upstream.
§Examples
use osproxy_spi::HeaderOp;
let op = HeaderOp::Add { name: "x-tenant".into(), value: "acme".into() };
assert!(matches!(op, HeaderOp::Add { .. }));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.
Add
Add a header (does not remove an existing one of the same name).
Remove
Remove all headers with this name.
Replace
Replace (remove-then-add) a header.
Trait Implementations§
impl Eq for HeaderOp
impl StructuralPartialEq for HeaderOp
Auto Trait Implementations§
impl Freeze for HeaderOp
impl RefUnwindSafe for HeaderOp
impl Send for HeaderOp
impl Sync for HeaderOp
impl Unpin for HeaderOp
impl UnsafeUnpin for HeaderOp
impl UnwindSafe for HeaderOp
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