pub struct DnfExpr { /* private fields */ }
Expand description
A #[cfg]
directive in Disjunctive Normal Form (DNF).
Implementations§
source§impl DnfExpr
impl DnfExpr
pub fn new(expr: CfgExpr) -> Self
sourcepub fn why_inactive(&self, opts: &CfgOptions) -> Option<InactiveReason>
pub fn why_inactive(&self, opts: &CfgOptions) -> Option<InactiveReason>
Computes a list of present or absent atoms in opts
that cause this expression to evaluate
to false
.
Note that flipping a subset of these atoms might be sufficient to make the whole expression
evaluate to true
. For that, see compute_enable_hints
.
Returns None
when self
is already true, or contains errors.
sourcepub fn compute_enable_hints<'a>(
&'a self,
opts: &'a CfgOptions
) -> impl Iterator<Item = CfgDiff> + 'a
pub fn compute_enable_hints<'a>( &'a self, opts: &'a CfgOptions ) -> impl Iterator<Item = CfgDiff> + 'a
Returns CfgDiff
objects that would enable this directive if applied to opts
.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DnfExpr
impl Send for DnfExpr
impl Sync for DnfExpr
impl Unpin for DnfExpr
impl UnwindSafe for DnfExpr
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