Struct measureme::RawEvent[][src]

#[repr(C)]
pub struct RawEvent { pub event_kind: StringId, pub event_id: EventId, pub thread_id: u32, pub start_time_lower: u32, pub end_time_lower: u32, pub start_and_end_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: StringIdevent_id: EventIdthread_id: u32start_time_lower: u32end_time_lower: u32start_and_end_upper: u32

Implementations

impl RawEvent[src]

pub fn new_interval(
    event_kind: StringId,
    event_id: EventId,
    thread_id: u32,
    start_count: u64,
    end_count: u64
) -> RawEvent
[src]

pub fn new_instant(
    event_kind: StringId,
    event_id: EventId,
    thread_id: u32,
    count: u64
) -> RawEvent
[src]

pub fn start_nanos(&self) -> u64[src]

pub fn end_nanos(&self) -> u64[src]

pub fn is_instant(&self) -> bool[src]

pub fn serialize(&self, bytes: &mut [u8])[src]

pub fn deserialize(bytes: &[u8]) -> RawEvent[src]

Trait Implementations

impl Debug for RawEvent[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for RawEvent[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl PartialEq<RawEvent> for RawEvent[src]

fn eq(&self, other: &RawEvent) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &RawEvent) -> bool[src]

This method tests for !=.

impl Eq for RawEvent[src]

impl StructuralEq for RawEvent[src]

impl StructuralPartialEq for RawEvent[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.