#[non_exhaustive]pub struct IpcIntegrityReport {
pub total_calls: usize,
pub completed: usize,
pub pending: usize,
pub errored: usize,
pub stale_calls: Vec<StaleCall>,
pub error_calls: Vec<ErrorCall>,
pub healthy: bool,
}Expand description
Summary of IPC round-trip health: completed, pending, errored, and stale calls.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.total_calls: usizeTotal number of IPC calls analyzed.
completed: usizeCalls that completed successfully.
pending: usizeCalls still awaiting a response.
errored: usizeCalls that returned an error.
stale_calls: Vec<StaleCall>Pending calls that have exceeded the staleness threshold.
error_calls: Vec<ErrorCall>Calls that resulted in errors.
healthy: boolTrue if there are no stale or errored calls.
Trait Implementations§
Source§impl Clone for IpcIntegrityReport
impl Clone for IpcIntegrityReport
Source§impl Debug for IpcIntegrityReport
impl Debug for IpcIntegrityReport
Source§impl<'de> Deserialize<'de> for IpcIntegrityReport
impl<'de> Deserialize<'de> for IpcIntegrityReport
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
Source§impl Display for IpcIntegrityReport
§Examples
use victauri_core::verification::IpcIntegrityReport;
use serde_json::json;
// Reports come from `check_ipc_integrity`; parsed from JSON here to show both states.
let healthy: IpcIntegrityReport = serde_json::from_value(json!({
"total_calls": 10, "completed": 10, "pending": 0, "errored": 0,
"stale_calls": [], "error_calls": [], "healthy": true
}))
.unwrap();
assert_eq!(
healthy.to_string(),
"IPC healthy: 10/10 completed"
);
let unhealthy: IpcIntegrityReport = serde_json::from_value(json!({
"total_calls": 10, "completed": 7, "pending": 2, "errored": 1,
"stale_calls": [], "error_calls": [], "healthy": false
}))
.unwrap();
assert_eq!(
unhealthy.to_string(),
"IPC unhealthy: 0 stale, 1 errored of 10 calls"
);
impl Display for IpcIntegrityReport
§Examples
use victauri_core::verification::IpcIntegrityReport;
use serde_json::json;
// Reports come from `check_ipc_integrity`; parsed from JSON here to show both states.
let healthy: IpcIntegrityReport = serde_json::from_value(json!({
"total_calls": 10, "completed": 10, "pending": 0, "errored": 0,
"stale_calls": [], "error_calls": [], "healthy": true
}))
.unwrap();
assert_eq!(
healthy.to_string(),
"IPC healthy: 10/10 completed"
);
let unhealthy: IpcIntegrityReport = serde_json::from_value(json!({
"total_calls": 10, "completed": 7, "pending": 2, "errored": 1,
"stale_calls": [], "error_calls": [], "healthy": false
}))
.unwrap();
assert_eq!(
unhealthy.to_string(),
"IPC unhealthy: 0 stale, 1 errored of 10 calls"
);impl Eq for IpcIntegrityReport
Source§impl PartialEq for IpcIntegrityReport
impl PartialEq for IpcIntegrityReport
Source§impl Serialize for IpcIntegrityReport
impl Serialize for IpcIntegrityReport
impl StructuralPartialEq for IpcIntegrityReport
Auto Trait Implementations§
impl Freeze for IpcIntegrityReport
impl RefUnwindSafe for IpcIntegrityReport
impl Send for IpcIntegrityReport
impl Sync for IpcIntegrityReport
impl Unpin for IpcIntegrityReport
impl UnsafeUnpin for IpcIntegrityReport
impl UnwindSafe for IpcIntegrityReport
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