#[non_exhaustive]pub struct HeaderConditionView {
pub name: String,
pub op: String,
pub value: Option<String>,
}Expand description
One header condition in a WhenView.
§RFC 016 — per-condition identity
A NodeId is not stored in this routing-crate type; the
routing crate doesn’t depend on apimock-config or its NodeId
type. Instead, the config crate’s snapshot layer wraps each view
in a ConditionWithId that pairs the routing view with a NodeId.
GUI code that needs to issue granular edit commands should use
those wrapped types via the snapshot API.
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 as stored (lower-cased at parse time).
op: StringOperator in snake_case TOML form, e.g. "equal", "contains".
value: Option<String>Configured value. None when the operator implies no value.
Trait Implementations§
Source§impl Clone for HeaderConditionView
impl Clone for HeaderConditionView
Source§fn clone(&self) -> HeaderConditionView
fn clone(&self) -> HeaderConditionView
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 moreSource§impl Debug for HeaderConditionView
impl Debug for HeaderConditionView
Auto Trait Implementations§
impl Freeze for HeaderConditionView
impl RefUnwindSafe for HeaderConditionView
impl Send for HeaderConditionView
impl Sync for HeaderConditionView
impl Unpin for HeaderConditionView
impl UnsafeUnpin for HeaderConditionView
impl UnwindSafe for HeaderConditionView
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