Trait AsScoped

Source
pub trait AsScoped<'a> {
    // Required method
    fn as_scoped(&'a self, base: Scope) -> Scope;
}
Expand description

A value that can be used as a metric scope.

This helper trait allows us to accept either a single string or a slice of strings to use as a scope, to avoid needing to allocate in the case where we want to be able to specify multiple scope levels in a single go.

Required Methods§

Source

fn as_scoped(&'a self, base: Scope) -> Scope

Creates a new [Scope] by adding self to the base scope.

Implementations on Foreign Types§

Source§

impl<'a> AsScoped<'a> for str

Source§

fn as_scoped(&'a self, base: Scope) -> Scope

Implementors§

Source§

impl<'a, 'b, T> AsScoped<'a> for T
where &'a T: AsRef<[&'b str]>, T: 'a,