pub struct Rule {
pub name: String,
pub host: Option<String>,
pub path: Option<String>,
pub method: Option<String>,
pub status: Option<String>,
pub require_headers: Vec<String>,
pub max_latency_ms: Option<f64>,
pub forbid: bool,
}Fields§
§name: StringHuman-readable rule name (shown in findings).
host: Option<String>Host glob the rule applies to (None = any host).
path: Option<String>Path glob the rule applies to (None = any path).
method: Option<String>HTTP method glob (None = any method).
status: Option<String>Status glob, matched against the stringified status (e.g. “2*”, “404”).
require_headers: Vec<String>Header names that must be present on matching requests.
max_latency_ms: Option<f64>Maximum allowed request duration in milliseconds.
forbid: boolIf true, any matching request is itself a violation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rule
impl<'de> Deserialize<'de> for Rule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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