pub struct SampleId(/* private fields */);
Expand description
A subset of the sample fields that can be recorded in non-SAMPLE records.
This will be empty by default unless sample_id_all
was set when
configuring the perf event counter.
Implementations§
Source§impl SampleId
impl SampleId
Sourcepub fn from_sample(sample: &Sample<'_>) -> Self
pub fn from_sample(sample: &Sample<'_>) -> Self
Construct a SampleId
by reading its fields out of a full sample
struct.
Sourcepub fn time(&self) -> Option<u64>
pub fn time(&self) -> Option<u64>
The time at which this event was recorded.
The clock used to record the time depends on how the clock was configured when setting up the counter.
Sourcepub fn id(&self) -> Option<u64>
pub fn id(&self) -> Option<u64>
The unique kernel-assigned ID for the leader of this counter group.
Sourcepub fn stream_id(&self) -> Option<u64>
pub fn stream_id(&self) -> Option<u64>
The unique kernel-assigned ID for the counter that generated this event.
Sourcepub fn estimate_len<E: Endian>(config: &ParseConfig<E>) -> usize
pub fn estimate_len<E: Endian>(config: &ParseConfig<E>) -> usize
Get the length in bytes that this struct would need to be parsed from the provided parser.
Trait Implementations§
impl Copy for SampleId
Auto Trait Implementations§
impl Freeze for SampleId
impl RefUnwindSafe for SampleId
impl Send for SampleId
impl Sync for SampleId
impl Unpin for SampleId
impl UnwindSafe for SampleId
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