pub struct RouteParams {Show 15 fields
pub action: RouteAction,
pub pattern: Option<String>,
pub match_type: Option<RouteMatchType>,
pub method: Option<String>,
pub behavior: Option<RouteBehavior>,
pub status: Option<u16>,
pub status_text: Option<String>,
pub headers: Option<Value>,
pub body: Option<Value>,
pub content_type: Option<String>,
pub delay_ms: Option<u64>,
pub times: Option<u64>,
pub id: Option<u64>,
pub limit: Option<usize>,
pub webview_label: Option<String>,
}Expand description
Parameters for the compound route tool (network interception / mock / block / delay).
Fields§
§action: RouteActionAction: add, list, clear, clear_all, matches.
pattern: Option<String>URL pattern to match (for add). Interpreted per match_type.
match_type: Option<RouteMatchType>How pattern is matched: substring (default), glob, regex, exact.
method: Option<String>Restrict to a single HTTP method (for add, optional).
behavior: Option<RouteBehavior>What the rule does: block, fulfill, delay (for add). Defaults to fulfill.
status: Option<u16>Mock response status code (for fulfill). Default 200.
status_text: Option<String>Mock response status text (for fulfill).
headers: Option<Value>Mock response headers as a JSON object (for fulfill).
body: Option<Value>Mock response body (for fulfill). Strings sent as-is; other JSON is serialized.
content_type: Option<String>Mock response content-type (for fulfill). Default “application/json”.
delay_ms: Option<u64>Delay in milliseconds (for delay, or to delay a fulfill).
times: Option<u64>Maximum times this rule fires (for add). 0 or omitted = unlimited.
id: Option<u64>Route rule id (for clear).
limit: Option<usize>Maximum match-log entries to return (for matches).
webview_label: Option<String>Target webview label.
Trait Implementations§
Source§impl Debug for RouteParams
impl Debug for RouteParams
Source§impl<'de> Deserialize<'de> for RouteParams
impl<'de> Deserialize<'de> for RouteParams
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>,
Source§impl JsonSchema for RouteParams
impl JsonSchema for RouteParams
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more