made-core 0.7.4

Domain core of MADE: entities, value objects, events, ports. No IO.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// The operational metrics recorder selected by a composition root.
///
/// Names are static because recorder implementations are fixed by the build,
/// while the type keeps provider vocabulary out of the metrics port contract.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RecorderName(&'static str);

impl RecorderName {
    #[must_use]
    pub const fn new(value: &'static str) -> Self {
        Self(value)
    }

    #[must_use]
    pub const fn as_str(self) -> &'static str {
        self.0
    }
}