#[repr(C)]pub struct RawEvent {
pub event_kind: StringId,
pub event_id: EventId,
pub thread_id: u32,
pub payload1_lower: u32,
pub payload2_lower: u32,
pub payloads_upper: u32,
}
Expand description
RawEvent
is how events are stored on-disk. If you change this struct,
make sure that you increment file_header::CURRENT_FILE_FORMAT_VERSION
.
Fields§
§event_kind: StringId
§event_id: EventId
§thread_id: u32
§payload1_lower: u32
§payload2_lower: u32
§payloads_upper: u32
Implementations§
source§impl RawEvent
impl RawEvent
pub fn new_interval( event_kind: StringId, event_id: EventId, thread_id: u32, start: u64, end: u64 ) -> Self
pub fn new_instant( event_kind: StringId, event_id: EventId, thread_id: u32, instant: u64 ) -> Self
pub fn new_integer( event_kind: StringId, event_id: EventId, thread_id: u32, value: u64 ) -> Self
sourcepub fn start_value(&self) -> u64
pub fn start_value(&self) -> u64
The start value assuming self is an interval
pub fn is_instant(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn serialize(&self, bytes: &mut [u8])
pub fn deserialize(bytes: &[u8]) -> RawEvent
Trait Implementations§
source§impl PartialEq for RawEvent
impl PartialEq for RawEvent
impl Eq for RawEvent
impl StructuralPartialEq for RawEvent
Auto Trait Implementations§
impl Freeze for RawEvent
impl RefUnwindSafe for RawEvent
impl Send for RawEvent
impl Sync for RawEvent
impl Unpin for RawEvent
impl UnwindSafe for RawEvent
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