Trait nagiosplugin::Metric [−][src]
This trait can be implemented for any kind of metric and will be used to generate the final string output for nagios. Calls to the functions should return immediately and not query the service every time.
Associated Types
type Output: ToPerfString
[src]
Required methods
fn name(&self) -> &str
[src]
fn state(&self) -> Option<State>
[src]
fn value(&self) -> Self::Output
[src]
fn warning(&self) -> Option<Self::Output>
[src]
fn critical(&self) -> Option<Self::Output>
[src]
fn min(&self) -> Option<Self::Output>
[src]
fn max(&self) -> Option<Self::Output>
[src]
fn unit_of_measurement(&self) -> &Unit
[src]
Implementors
impl<T> Metric for PartialOrdMetric<T> where
T: PartialOrd + ToPerfString + Clone,
[src]
T: PartialOrd + ToPerfString + Clone,
type Output = T
fn name(&self) -> &str
[src]
fn state(&self) -> Option<State>
[src]
fn value(&self) -> Self::Output
[src]
fn warning(&self) -> Option<Self::Output>
[src]
fn critical(&self) -> Option<Self::Output>
[src]
fn min(&self) -> Option<Self::Output>
[src]
fn max(&self) -> Option<Self::Output>
[src]
fn unit_of_measurement(&self) -> &Unit
[src]
impl<T> Metric for SimpleMetric<T> where
T: ToPerfString + Clone,
[src]
T: ToPerfString + Clone,