pub trait ProvideMeter:
Send
+ Sync
+ Debug {
// Required method
fn get_meter(
&self,
scope: &'static str,
attributes: Option<&Attributes>,
) -> Meter;
// Provided methods
fn as_any(&self) -> &dyn Any { ... }
fn provider_name(&self) -> &'static str { ... }
}Expand description
Provides named instances of Meter.
Required Methods§
Provided Methods§
Sourcefn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Returns a reference to self as &dyn Any for downcasting.
The default implementation returns a reference to the unit type,
which will fail any downcast attempts. Implementations should override
this to return self for proper type inspection.
Sourcefn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Returns the name of this provider implementation. This is used for feature tracking without requiring type imports.