pub struct TraceEvent {
pub seq: u64,
pub timestamp: i64,
pub data: EventData,
}Expand description
A single event in a .moqtrace file.
Fields§
§seq: u64Monotonically increasing sequence number (0-based).
timestamp: i64Timestamp in microseconds since the header’s startTime.
data: EventDataEvent-specific data.
Implementations§
Source§impl TraceEvent
impl TraceEvent
Sourcepub fn request_id(&self) -> Option<u64>
pub fn request_id(&self) -> Option<u64>
Extract the request_id from a control message’s decoded "msg"
field, if present.
Returns None for non-control-message events or if the "msg" map
does not contain a "requestId" key.
Sourcepub fn message_type(&self) -> Option<u64>
pub fn message_type(&self) -> Option<u64>
Return the message type for control message events.
Trait Implementations§
Source§impl Clone for TraceEvent
impl Clone for TraceEvent
Source§fn clone(&self) -> TraceEvent
fn clone(&self) -> TraceEvent
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 moreSource§impl Debug for TraceEvent
impl Debug for TraceEvent
Source§impl From<&TraceEvent> for Value
Build a CBOR Value from a TraceEvent by running it through the
crate’s Serialize impl. Convenience for tests and inspection — the
hot write path in MoqTraceWriter uses
Serialize directly and never materializes a Value.
impl From<&TraceEvent> for Value
Build a CBOR Value from a TraceEvent by running it through the
crate’s Serialize impl. Convenience for tests and inspection — the
hot write path in MoqTraceWriter uses
Serialize directly and never materializes a Value.
Source§fn from(event: &TraceEvent) -> Self
fn from(event: &TraceEvent) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TraceEvent
impl PartialEq for TraceEvent
Source§impl Serialize for TraceEvent
impl Serialize for TraceEvent
Source§impl TryFrom<Value> for TraceEvent
impl TryFrom<Value> for TraceEvent
Source§type Error = MoqTraceError
type Error = MoqTraceError
The type returned in the event of a conversion error.
impl StructuralPartialEq for TraceEvent
Auto Trait Implementations§
impl Freeze for TraceEvent
impl RefUnwindSafe for TraceEvent
impl Send for TraceEvent
impl Sync for TraceEvent
impl Unpin for TraceEvent
impl UnsafeUnpin for TraceEvent
impl UnwindSafe for TraceEvent
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