greentic_component/
lifecycle.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
4pub struct Lifecycle {
5    pub init: bool,
6    pub health: bool,
7    pub shutdown: bool,
8}
9
10impl Lifecycle {
11    pub fn is_noop(&self) -> bool {
12        !(self.init || self.health || self.shutdown)
13    }
14}