pub struct EventArgRecorder<'p> {
    profiler: &'p SelfProfiler,
    args: SmallVec<[StringId; 2]>,
}
Expand description

A helper for recording costly arguments to self-profiling events. Used with SelfProfilerRef::generic_activity_with_arg_recorder.

Fields

profiler: &'p SelfProfiler

The SelfProfiler used to intern the event arguments that users will ask to record.

args: SmallVec<[StringId; 2]>

The interned event arguments to be recorded in the generic activity event.

The most common case, when actually recording event arguments, is to have one argument. Then followed by recording two, in a couple places.

Implementations

Records a single argument within the current generic activity being profiled.

Note: when self-profiling with costly event arguments, at least one argument needs to be recorded. A panic will be triggered if that doesn’t happen.

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 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.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes