Skip to main content

Crate metrique_core

Crate metrique_core 

Source
Expand description

This crate contains core trait and struct definitions for metrique, to allow for compatibility between (future) different major versions of metrique. You should be using metrique directly rather than this crate.

Modules§

concat
Utilities for concatenating strings

Structs§

Counter
A thin wrapper around AtomicU64 that implements CloseValue.
CounterGuard
A guard that decrements a Counter when dropped.
Identity
Inflects names to the identity case
KebabCase
Inflects names to kebab-case
OwnedCounterGuard
An owned guard that decrements a Counter when dropped.
PascalCase
inflects names to PascalCase
SnakeCase
Inflects names to snake_case

Enums§

DynamicNameStyle
Runtime-selectable name style for metric field names.

Traits§

CloseEntry
An object that can be closed into an InflectableEntry. This is the normal way of generating a metric entry - by starting with a a struct that implements this trait (that is generally generated using the #[metrics] macro), wrapping it in a RootEntry to generate an Entry, and then emitting that to an EntrySink.
CloseValue
Close a given value
CloseValueRef
Close a value without taking ownership
InflectableEntry
A trait for metric entries where the names of the fields can be “inflected” using a NameStyle. This defines the interface for metric sources that want to be able to generate metric structs that can be renamed without having any string operations happen at runtime.
NameStyle
This trait is used to describe name styles for InflectableEntry.