Skip to main content

dnslib/core/dns/
stats.rs

1use serde_json::Value;
2
3use crate::core::{dns::service::StatsRead, error::Result};
4
5/// Get DNS dashboard statistics through a vendor-neutral stats reader.
6///
7/// # Errors
8///
9/// Returns any error reported by the selected DNS backend.
10pub async fn get_stats<C: StatsRead + ?Sized>(client: &C, stats_type: &str) -> Result<Value> {
11    client.get_stats(stats_type).await
12}