apimock-routing 5.1.2

Routing model for apimock: rule sets, request matching, and read-only views for GUI tooling.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use serde::Deserialize;

use super::request::rule_op::RuleOp;

#[derive(Clone, Debug, Deserialize)]
pub struct ConditionStatement {
    pub op: Option<RuleOp>,
    pub value: String,
}

impl std::fmt::Display for ConditionStatement {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}`{}`", self.op.clone().unwrap_or_default(), self.value)
    }
}