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
use crate::entities::MetricsSnapshot;
use crate::error::DomainError;
use crate::ports::MetricsSnapshotPort;

/// Registry reader for a host that intentionally has no metrics registry.
#[derive(Clone, Copy, Debug, Default)]
pub struct NoopMetricsSnapshot;

impl MetricsSnapshotPort for NoopMetricsSnapshot {
    fn snapshot(&self) -> Result<MetricsSnapshot, DomainError> {
        Ok(MetricsSnapshot::empty())
    }
}