made_core/value_objects/recorder_name.rs
1/// The operational metrics recorder selected by a composition root.
2///
3/// Names are static because recorder implementations are fixed by the build,
4/// while the type keeps provider vocabulary out of the metrics port contract.
5#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
6pub struct RecorderName(&'static str);
7
8impl RecorderName {
9 #[must_use]
10 pub const fn new(value: &'static str) -> Self {
11 Self(value)
12 }
13
14 #[must_use]
15 pub const fn as_str(self) -> &'static str {
16 self.0
17 }
18}