pub struct RuleSpec<T> {
pub version: u32,
pub on: Vec<String>,
pub when: Vec<Condition>,
pub then: Vec<T>,
pub related: bool,
pub schedule: Option<Schedule>,
}Expand description
When a rule runs and what it does; T is the application’s then-action.
Fields§
§version: u32§on: Vec<String>Event kinds (import, journal.*, *); any one matching is enough.
when: Vec<Condition>All must hold.
then: Vec<T>Only for events about where the rule lives (the host decides what that means).
schedule: Option<Schedule>Run on a schedule as well.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for RuleSpec<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for RuleSpec<T>where
T: Deserialize<'de>,
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
impl<T: PartialEq> StructuralPartialEq for RuleSpec<T>
Auto Trait Implementations§
impl<T> Forget for RuleSpec<T>
impl<T> Freeze for RuleSpec<T>
impl<T> Move for RuleSpec<T>
impl<T> RefUnwindSafe for RuleSpec<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for RuleSpec<T>
impl<T> Sync for RuleSpec<T>
impl<T> Unpin for RuleSpec<T>
impl<T> UnsafeUnpin for RuleSpec<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for RuleSpec<T>where
Vec<T>: UnwindSafe,
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