use std::marker::PhantomData;
use super::*;
use crate::services::server_lists::DownloadResponses;
#[derive(Debug)]
pub struct DownloadResponsesStats<'a> {
pub nameserver_configs: usize,
pub errors: usize,
phantom: PhantomData<&'a usize>,
}
impl<'a> Statistics<'a> for DownloadResponses {
type StatsOut = DownloadResponsesStats<'a>;
fn statistics(&'a self) -> Self::StatsOut {
DownloadResponsesStats {
nameserver_configs: self.nameserver_configs().count(),
errors: self.err().count(),
phantom: PhantomData,
}
}
}