rabbitmq_stream_client/client/
metrics.rs1#[async_trait::async_trait]
2pub trait MetricsCollector: Send + Sync {
3 async fn publish(&self, count: u64);
4 async fn consume(&self, count: u64);
5 async fn publish_confirm(&self, count: u64);
6 async fn publish_error(&self, count: u64);
7}
8pub struct NopMetricsCollector {}
9
10#[async_trait::async_trait]
11impl MetricsCollector for NopMetricsCollector {
12 async fn publish(&self, _count: u64) {}
13 async fn publish_confirm(&self, _count: u64) {}
14 async fn publish_error(&self, _count: u64) {}
15
16 async fn consume(&self, _count: u64) {}
17}