pub enum HeadersAction {
Allow,
Modify {
headers: HashMap<String, String>,
status_code: Option<u16>,
},
Block,
}Expand description
Action to take for intercepted headers.
Variants§
Allow
Allow headers to proceed unchanged.
Modify
Modify headers with optional status code override.
Fields
Block
Block/cancel the request.
Implementations§
Source§impl HeadersAction
impl HeadersAction
Sourcepub fn modify_headers(headers: HashMap<String, String>) -> Self
pub fn modify_headers(headers: HashMap<String, String>) -> Self
Creates a Modify action with headers only (no status code change).
Trait Implementations§
Source§impl Clone for HeadersAction
impl Clone for HeadersAction
Source§fn clone(&self) -> HeadersAction
fn clone(&self) -> HeadersAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HeadersAction
impl RefUnwindSafe for HeadersAction
impl Send for HeadersAction
impl Sync for HeadersAction
impl Unpin for HeadersAction
impl UnsafeUnpin for HeadersAction
impl UnwindSafe for HeadersAction
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