pub struct DiagnosticEntry {Show 16 fields
pub seq: u64,
pub timestamp_us: u64,
pub kind: DiagnosticEventKind,
pub mode: Option<InspectorMode>,
pub previous_mode: Option<InspectorMode>,
pub hover_pos: Option<(u16, u16)>,
pub selected: Option<HitId>,
pub widget_name: Option<String>,
pub widget_area: Option<Rect>,
pub widget_depth: Option<u8>,
pub widget_hit_id: Option<HitId>,
pub widget_count: Option<usize>,
pub flag: Option<String>,
pub enabled: Option<bool>,
pub context: Option<String>,
pub checksum: u64,
}Expand description
JSONL diagnostic log entry.
Fields§
§seq: u64Monotonic sequence number.
timestamp_us: u64Timestamp in microseconds.
kind: DiagnosticEventKindEvent kind.
mode: Option<InspectorMode>Current inspector mode.
previous_mode: Option<InspectorMode>Previous inspector mode.
hover_pos: Option<(u16, u16)>Hover position.
selected: Option<HitId>Selected widget id.
widget_name: Option<String>Widget name (if applicable).
widget_area: Option<Rect>Widget area (if applicable).
widget_depth: Option<u8>Widget depth (if applicable).
widget_hit_id: Option<HitId>Widget hit id (if applicable).
widget_count: Option<usize>Total widget count (if applicable).
flag: Option<String>Flag name (for toggles).
enabled: Option<bool>Flag enabled state (for toggles).
context: Option<String>Additional context string.
checksum: u64Checksum for determinism verification.
Implementations§
Source§impl DiagnosticEntry
impl DiagnosticEntry
Sourcepub fn new(kind: DiagnosticEventKind) -> Self
pub fn new(kind: DiagnosticEventKind) -> Self
Create a new diagnostic entry with current timestamp.
Sourcepub fn with_mode(self, mode: InspectorMode) -> Self
pub fn with_mode(self, mode: InspectorMode) -> Self
Set inspector mode.
Sourcepub fn with_previous_mode(self, mode: InspectorMode) -> Self
pub fn with_previous_mode(self, mode: InspectorMode) -> Self
Set previous inspector mode.
Sourcepub fn with_hover_pos(self, pos: Option<(u16, u16)>) -> Self
pub fn with_hover_pos(self, pos: Option<(u16, u16)>) -> Self
Set hover position.
Sourcepub fn with_selected(self, selected: Option<HitId>) -> Self
pub fn with_selected(self, selected: Option<HitId>) -> Self
Set selected widget id.
Sourcepub fn with_widget(self, widget: &WidgetInfo) -> Self
pub fn with_widget(self, widget: &WidgetInfo) -> Self
Set widget info.
Sourcepub fn with_widget_count(self, count: usize) -> Self
pub fn with_widget_count(self, count: usize) -> Self
Set widget count.
Sourcepub fn with_flag(self, flag: impl Into<String>, enabled: bool) -> Self
pub fn with_flag(self, flag: impl Into<String>, enabled: bool) -> Self
Set flag toggle details.
Sourcepub fn with_context(self, context: impl Into<String>) -> Self
pub fn with_context(self, context: impl Into<String>) -> Self
Set context string.
Sourcepub fn with_checksum(self) -> Self
pub fn with_checksum(self) -> Self
Compute and set checksum.
Trait Implementations§
Source§impl Clone for DiagnosticEntry
impl Clone for DiagnosticEntry
Source§fn clone(&self) -> DiagnosticEntry
fn clone(&self) -> DiagnosticEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DiagnosticEntry
impl RefUnwindSafe for DiagnosticEntry
impl Send for DiagnosticEntry
impl Sync for DiagnosticEntry
impl Unpin for DiagnosticEntry
impl UnwindSafe for DiagnosticEntry
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