pub struct EventRecord {
pub timestamp_ms: u64,
pub kind: EventKind,
pub event_type: &'static str,
pub target: Option<ElementId>,
pub chain: Vec<ElementId>,
pub consumed_by: Option<ElementId>,
pub detail: String,
}Expand description
单条事件日志。按 EventKind 区分记录内容。
Fields§
§timestamp_ms: u64从进程启动到现在的毫秒数(与其他 trace 同时钟源)。
kind: EventKind这条记录的语义:事件派发/投递/消费 / 焦点转移 / 竞技场胜者 / 命中测试。
event_type: &'static strWidgetEvent 的短名(“PointerDown” / “FocusGained” 等)。
target: Option<ElementId>这条记录关联的主目标 ElementId(可能是 None,比如空命中)。
chain: Vec<ElementId>命中链 / 冒泡链(按内→外顺序)。为空表示这条记录不关心链。
consumed_by: Option<ElementId>谁消费了事件(deliver_event 返回 true 的那个 element)。
detail: String自由文本(竞技场“Accepted=id“、焦点“old→new“、命中“overlay vs main“等)。
Trait Implementations§
Source§impl Clone for EventRecord
impl Clone for EventRecord
Auto Trait Implementations§
impl Forget for EventRecord
impl Freeze for EventRecord
impl Move for EventRecord
impl RefUnwindSafe for EventRecord
impl Send for EventRecord
impl Sync for EventRecord
impl Unpin for EventRecord
impl UnsafeUnpin for EventRecord
impl UnwindSafe for EventRecord
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