[][src]Trait dipstick::Prefixed

pub trait Prefixed {
    fn get_prefixes(&self) -> &NameParts;
fn add_prefix<S: Into<String>>(&self, name: S) -> Self;
fn add_name<S: Into<String>>(&self, name: S) -> Self;
fn named<S: Into<String>>(&self, name: S) -> Self; fn prefix_append<S: Into<MetricName>>(&self, name: S) -> MetricName { ... }
fn prefix_prepend<S: Into<MetricName>>(&self, name: S) -> MetricName { ... } }

Name operations support.

Required methods

fn get_prefixes(&self) -> &NameParts

Returns namespace of component.

fn add_prefix<S: Into<String>>(&self, name: S) -> Self

Deprecated since 0.7.2:

Use named() or add_name()

Append a name to the existing names. Return a clone of the component with the updated names.

fn add_name<S: Into<String>>(&self, name: S) -> Self

Append a name to the existing names. Return a clone of the component with the updated names.

fn named<S: Into<String>>(&self, name: S) -> Self

Replace any existing names with a single name. Return a clone of the component with the new name. If multiple names are required, add_name may also be used.

Loading content...

Provided methods

fn prefix_append<S: Into<MetricName>>(&self, name: S) -> MetricName

Append any name parts to the name's namespace.

fn prefix_prepend<S: Into<MetricName>>(&self, name: S) -> MetricName

Prepend any name parts to the name's namespace.

Loading content...

Implementors

impl<T: WithAttributes> Prefixed for T[src]

fn get_prefixes(&self) -> &NameParts[src]

Returns namespace of component.

fn add_prefix<S: Into<String>>(&self, name: S) -> Self[src]

Deprecated since 0.7.2:

Use named() or add_name()

Append a name to the existing names. Return a clone of the component with the updated names.

fn add_name<S: Into<String>>(&self, name: S) -> Self[src]

Append a name to the existing names. Return a clone of the component with the updated names.

fn named<S: Into<String>>(&self, name: S) -> Self[src]

Replace any existing names with a single name. Return a clone of the component with the new name. If multiple names are required, add_name may also be used.

Loading content...