[][src]Struct nagiosplugin::SimpleMetric

pub struct SimpleMetric<T> where
    T: ToPerfString + Clone
{ /* fields omitted */ }

Represents a simple metric where no logic is performed. You give some values in and the same get out.

Methods

impl<T> SimpleMetric<T> where
    T: ToPerfString + Clone
[src]

pub fn new(
    name: &str,
    state: Option<State>,
    value: T,
    warning: Option<T>,
    critical: Option<T>,
    min: Option<T>,
    max: Option<T>
) -> Self
[src]

pub fn set_unit_of_measurement(&mut self, unit_of_measurement: Unit)[src]

Trait Implementations

impl<T> Metric for SimpleMetric<T> where
    T: ToPerfString + Clone
[src]

type Output = T

impl<T: Clone> Clone for SimpleMetric<T> where
    T: ToPerfString + Clone
[src]

Auto Trait Implementations

impl<T> Send for SimpleMetric<T> where
    T: Send

impl<T> Unpin for SimpleMetric<T> where
    T: Unpin

impl<T> Sync for SimpleMetric<T> where
    T: Sync

impl<T> UnwindSafe for SimpleMetric<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for SimpleMetric<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, O> ResourceMetric for T where
    O: ToPerfString,
    T: Metric<Output = O> + ToPerfString
[src]

impl<T, O> ToPerfString for T where
    O: ToPerfString,
    T: Metric<Output = O>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]