#[non_exhaustive]pub struct IpcCall {
pub id: String,
pub command: String,
pub timestamp: DateTime<Utc>,
pub duration_ms: Option<u64>,
pub result: IpcResult,
pub arg_size_bytes: usize,
pub webview_label: String,
pub mocked: bool,
}Expand description
A single Tauri IPC call with timing, result, and source webview.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringUnique call identifier for correlation.
command: StringName of the Tauri command that was invoked.
timestamp: DateTime<Utc>When the call was initiated.
duration_ms: Option<u64>Round-trip duration in milliseconds, if completed.
result: IpcResultCurrent outcome of the call (pending, ok, or error).
arg_size_bytes: usizeSize of the serialized arguments in bytes.
webview_label: StringLabel of the webview that initiated the call.
mocked: boolThe call never reached the backend: a route rule fulfilled or blocked it in the
webview. recording replay skips such calls — replaying a mocked call would turn a
fake success into a real invocation.
Implementations§
Source§impl IpcCall
impl IpcCall
Sourcepub fn new(
id: impl Into<String>,
command: impl Into<String>,
timestamp: DateTime<Utc>,
result: IpcResult,
duration_ms: Option<u64>,
arg_size_bytes: usize,
webview_label: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, command: impl Into<String>, timestamp: DateTime<Utc>, result: IpcResult, duration_ms: Option<u64>, arg_size_bytes: usize, webview_label: impl Into<String>, ) -> Self
Creates an IPC call record.
IpcCall is #[non_exhaustive], so code outside this crate (bridges,
mocks, tests) builds it through this constructor rather than a struct
literal; fields added later get a default here instead of breaking callers.
§Examples
use victauri_core::{IpcCall, IpcResult};
let call = IpcCall::new(
"c1",
"greet",
chrono::Utc::now(),
IpcResult::Pending,
None,
0,
"main",
);
assert_eq!(call.command, "greet");Sourcepub fn with_mocked(self, mocked: bool) -> Self
pub fn with_mocked(self, mocked: bool) -> Self
Mark the call as answered by a route rule instead of the backend.