Skip to main content

InstrumentRegistration

Trait InstrumentRegistration 

Source
pub trait InstrumentRegistration:
    Sized
    + Instrument
    + 'static {
    const NAME: &'static str;

    // Required method
    fn build(config: &ProfilerConfig) -> Result<Self, InstrumentError>;
}
Expand description

Represents the information needed to construct an Instrument dynamically

Required Associated Constants§

Source

const NAME: &'static str

The human readable name of this instrument used in CLI arguments and user output

Required Methods§

Source

fn build(config: &ProfilerConfig) -> Result<Self, InstrumentError>

Create an instance of this instrument with the provided configuration

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl InstrumentRegistration for OpHistogram

Source§

const NAME: &'static str = "op-histogram"