#[non_exhaustive]pub struct HeaderConditionPayload {
pub name: String,
pub op: HeaderOp,
pub value: Option<String>,
}Expand description
One header condition in a RulePayload.
§#[non_exhaustive] (RFC 041)
ⓘ
use apimock_config::{HeaderConditionPayload, HeaderOp};
let _ = HeaderConditionPayload {
name: todo!(),
op: HeaderOp::Equal,
value: todo!(),
};Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringHeader name (case-insensitive at match time).
op: HeaderOp§value: Option<String>Required for all operators except Exists / Absent.
Implementations§
Trait Implementations§
Source§impl Clone for HeaderConditionPayload
impl Clone for HeaderConditionPayload
Source§fn clone(&self) -> HeaderConditionPayload
fn clone(&self) -> HeaderConditionPayload
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HeaderConditionPayload
impl RefUnwindSafe for HeaderConditionPayload
impl Send for HeaderConditionPayload
impl Sync for HeaderConditionPayload
impl Unpin for HeaderConditionPayload
impl UnsafeUnpin for HeaderConditionPayload
impl UnwindSafe for HeaderConditionPayload
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