pub enum OptsPatch {
Typed(TypedOptsPatch),
ForTypes(ForTypesPatch),
Universal(CommonOpts),
}Expand description
One cascade rule. Untagged order: typed → for_types → universal.
Variants§
Typed(TypedOptsPatch)
{ "type": "mol", "weight": 1.2 } — discriminated kind.
ForTypes(ForTypesPatch)
{ "for_types": ["mol","group"], "color": "#111" }.
Universal(CommonOpts)
{ "color": "#111" } — applies to every kind.
Implementations§
Source§impl OptsPatch
impl OptsPatch
Sourcepub fn applies_to(&self, target: NodeType) -> bool
pub fn applies_to(&self, target: NodeType) -> bool
Whether this patch applies when resolving for target.
pub fn apply_to_mol(&self, out: &mut MolOpts)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OptsPatch
impl<'de> Deserialize<'de> for OptsPatch
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 OptsPatch
Auto Trait Implementations§
impl Freeze for OptsPatch
impl RefUnwindSafe for OptsPatch
impl Send for OptsPatch
impl Sync for OptsPatch
impl Unpin for OptsPatch
impl UnsafeUnpin for OptsPatch
impl UnwindSafe for OptsPatch
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