[][src]Enum cfg_expr::expr::Predicate

pub enum Predicate<'a> {
    Target(TargetPredicate),
    Test,
    DebugAssertions,
    ProcMacro,
    Feature(&'a str),
    TargetFeature(&'a str),
    Flag(&'a str),
    KeyValue {
        key: &'a str,
        val: &'a str,
    },
}

A single predicate in a cfg() expression

Variants

A target predicate, with the target_ prefix

Test

Whether rustc's test harness is enabled

DebugAssertions

Enabled when compiling without optimizations.

ProcMacro

Enabled for crates of the proc_macro type.

Feature(&'a str)
TargetFeature(&'a str)
Flag(&'a str)

A generic bare predicate key that doesn't match one of the known options, eg cfg(bare)

KeyValue

A generic key = "value" predicate that doesn't match one of the known options, eg cfg(foo = "bar")

Fields of KeyValue

key: &'a strval: &'a str

Trait Implementations

impl<'a> Debug for Predicate<'a>[src]

impl<'a> PartialEq<Predicate<'a>> for Predicate<'a>[src]

impl<'a> StructuralPartialEq for Predicate<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Predicate<'a>

impl<'a> Send for Predicate<'a>

impl<'a> Sync for Predicate<'a>

impl<'a> Unpin for Predicate<'a>

impl<'a> UnwindSafe for Predicate<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.