1 2 3 4 5 6 7 8 9 10 11 12 13 14
use crate::{PingResult, PingResultProcessorCommonConfig};
pub trait PingResultProcessor {
fn name(&self) -> &'static str;
fn config(&self) -> &PingResultProcessorCommonConfig;
fn has_quiet_level(&self, quiet_level: i32) -> bool {
self.config().quiet_level >= quiet_level
}
fn initialize(&mut self) {}
fn process_ping_result(&mut self, ping_result: &PingResult);
fn rundown(&mut self) {}
}