pub enum Disabled {
Flag(bool),
Expr(String),
}Expand description
One entry’s disable state: a static flag or a !!js expression
evaluated at activation, with the raw text kept for write-back.
The YAML dialect maps disabled: true to Disabled::Flag and
disabled: !!js <expr> to Disabled::Expr; the expression stays
unevaluated in the tree and only takes effect through
crate::Entry::resolved_disabled. The serde (JSON) path has no
!!js, so a flag serializes as a boolean and an expression as its
raw string.
Variants§
Flag(bool)
Statically on/off. The default is off.
Expr(String)
disabled: !!js <expr> — the raw expression, evaluated when the
entry is activated (crate::expr::evaluate).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Disabled
impl<'de> Deserialize<'de> for Disabled
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Disabled
Auto Trait Implementations§
impl Freeze for Disabled
impl RefUnwindSafe for Disabled
impl Send for Disabled
impl Sync for Disabled
impl Unpin for Disabled
impl UnsafeUnpin for Disabled
impl UnwindSafe for Disabled
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