pub struct RawEventRecord<'a> {
    pub record_type: RecordType,
    pub misc: u16,
    pub data: RawData<'a>,
    pub parse_info: RecordParseInfo,
}
Expand description

An unparsed event record.

This can be converted into a parsed record by calling .parse().

The raw record also provides access to “common data” like the ID, timestamp, tid etc., i.e. the information that was requested with SampleFormat and AttrFlags::SAMPLE_ID_ALL.

Fields§

§record_type: RecordType

The record type. Must be a builtin type, i.e. not a user type.

§misc: u16

The misc value on this record.

§data: RawData<'a>

The raw bytes in the body of this record.

§parse_info: RecordParseInfo

The parse info from our corresponding evnt’s attr.

Implementations§

Create a new RawEventRecord. Must only be called if record_type.is_builtin_type() is true.

Parse “common data” on this record, see CommonData.

The available information is determined by the event attr, specifically by the requested SampleFormat and by the presence of the AttrFlags::SAMPLE_ID_ALL flag: The SampleFormat determines the available fields, and the SAMPLE_ID_ALL flag determines the record types on which these fields are available. If SAMPLE_ID_ALL is set, the requested fields are available on all records, otherwise only on sample records (RecordType::SAMPLE).

The record timestamp, if available.

The ID, if available.

Parses this raw record into an EventRecord.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.