Struct nagiosplugin::Resource
source · pub struct Resource { /* private fields */ }
Expand description
Represents a single service / resource from the perspective of Icinga.
Implementations§
source§impl Resource
impl Resource
sourcepub fn with_fixed_state(self, state: ServiceState) -> Self
pub fn with_fixed_state(self, state: ServiceState) -> Self
If a fixed state is set, the coressponding Resource will always report the given state regardless of the actual state of the CheckResults.
pub fn with_result(self, result: impl Into<CheckResult>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
pub fn set_description(&mut self, description: impl Into<String>)
pub fn push_result(&mut self, result: impl Into<CheckResult>)
sourcepub fn nagios_result(self) -> (ServiceState, String)
pub fn nagios_result(self) -> (ServiceState, String)
Calculates the state and message of this resource
Trait Implementations§
source§impl PartialEq for Resource
impl PartialEq for Resource
impl Eq for Resource
impl StructuralPartialEq for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more