[][src]Type Definition metrics_core::Key

type Key = Cow<'static, str>;

An optimized metric key.

As some metrics might be sent at high frequency, it makes no sense to constantly allocate and reallocate owned Strings when a static str would suffice. As we don't want to limit callers, though, we opt to use a copy-on-write pointer -- Cow -- to allow callers flexiblity in how and what they pass.