pub struct Service {Show 16 fields
pub name: String,
pub display_name: String,
pub host_name: String,
pub state: ServiceState,
pub last_state: ServiceState,
pub last_hard_state: ServiceState,
pub last_state_change: Timestamp,
pub last_state_critical: Timestamp,
pub last_state_warning: Timestamp,
pub last_state_ok: Timestamp,
pub last_state_unknown: Timestamp,
pub next_check: Timestamp,
pub last_check_result: Option<LastCheckResult>,
pub acknowledgement: Acknowledgement,
pub handled: bool,
pub last_reachable: bool,
}Fields§
§name: String§display_name: String§host_name: String§state: ServiceState§last_state: ServiceState§last_hard_state: ServiceState§last_state_change: Timestamp§last_state_critical: Timestamp§last_state_warning: Timestamp§last_state_ok: Timestamp§last_state_unknown: Timestamp§next_check: Timestamp§last_check_result: Option<LastCheckResult>§acknowledgement: Acknowledgement§handled: bool§last_reachable: boolImplementations§
Source§impl Service
impl Service
Sourcepub fn is_handled(&self) -> bool
pub fn is_handled(&self) -> bool
Return true if the Service is handled.
A service is handled if it is either
- acknowledged
- on downtime
- dependent on a handled service or host
The returned value corresponds to the handled field in icinga’s JSON representation for
services
pub fn host_is_reachable(&self) -> bool
Trait Implementations§
Source§impl CheckedObject for Service
impl CheckedObject for Service
const PATH: &'static str = "/v1/objects/services"
const OBJECT_TYPE_FOR_QUERY: &'static str = "service"
fn name(&self) -> &str
fn is_ok(&self) -> bool
fn acknowledgement(&self) -> &Acknowledgement
fn is_handled(&self) -> bool
fn set_name(&mut self, name: String)
fn set_acknowledgement(&mut self, ack: Acknowledgement)
fn set_handled(&mut self, handled: bool)
Source§impl<'de> Deserialize<'de> for Service
impl<'de> Deserialize<'de> for Service
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialOrd for Service
impl PartialOrd for Service
impl StructuralPartialEq for Service
Auto Trait Implementations§
impl Freeze for Service
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnwindSafe for Service
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