pub struct InboxRule {
pub name: Option<String>,
pub when: RuleWhen,
pub then: RuleThen,
}Expand description
One rule as written.
Fields§
§name: Option<String>What the rule is called in messages, toasts and show --why; without
one, its conditions in words.
when: RuleWhen§then: RuleThenImplementations§
Source§impl InboxRule
impl InboxRule
Sourcepub fn parse(value: &Value) -> Result<InboxRule, String>
pub fn parse(value: &Value) -> Result<InboxRule, String>
Reads one rule, refusing anything that would act other than as written.
Unknown keys are refused rather than ignored: prority silently
dropped would leave an empty when, which matches every issue - and
with dismiss that empties the inbox.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for InboxRule
impl<'de> Deserialize<'de> for InboxRule
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 StructuralPartialEq for InboxRule
Auto Trait Implementations§
impl Freeze for InboxRule
impl RefUnwindSafe for InboxRule
impl Send for InboxRule
impl Sync for InboxRule
impl Unpin for InboxRule
impl UnsafeUnpin for InboxRule
impl UnwindSafe for InboxRule
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