pub struct FaultParams {
pub action: FaultAction,
pub command: Option<String>,
pub fault_type: Option<FaultKind>,
pub delay_ms: Option<u64>,
pub error_message: Option<String>,
pub max_triggers: Option<u64>,
}Expand description
Parameters for the fault compound tool.
SCOPE (important): injected faults apply ONLY to commands executed through
Victauri’s own invoke_command tool. They do NOT intercept the application’s
real frontend-driven IPC (window.__TAURI_INTERNALS__.invoke → Tauri’s native
transport), which runs below the JS layer Victauri can reach. Use fault to
probe a backend handler’s behavior under failure when YOU drive the command
(e.g. “does my error path return the right shape on a DB error?”). It does not
reproduce a failure a user clicking the UI would experience — that path is not
interceptable cross-platform without CDP.
Fields§
§action: FaultActionWhich fault action to perform.
command: Option<String>Target command name (required for inject and clear).
fault_type: Option<FaultKind>Type of fault to inject (required for inject).
delay_ms: Option<u64>For delay faults: delay in milliseconds.
error_message: Option<String>For error faults: error message to return.
max_triggers: Option<u64>Maximum number of times to trigger (0 or omit for unlimited).
Trait Implementations§
Source§impl Debug for FaultParams
impl Debug for FaultParams
Source§impl<'de> Deserialize<'de> for FaultParams
impl<'de> Deserialize<'de> for FaultParams
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 FaultParams
impl JsonSchema for FaultParams
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