[][src]Enum runtime_cfg::Predicate

pub enum Predicate {
    Any(Vec<Box<Predicate>>),
    All(Vec<Box<Predicate>>),
    Not(Box<Predicate>),
    Name(String),
    NameValue(StringString),
}

A configuration predicate.

Variants

Any(Vec<Box<Predicate>>)

A configuration predicate success when any of sub-predicates success.

All(Vec<Box<Predicate>>)

A configuration predicate success when all of sub-predicates success.

Not(Box<Predicate>)

A configuration predicate apply not operator to a predicate.

Name(String)

A configuration predicate with name.

NameValue(StringString)

A configuration predicate with name and value.

Methods

impl Predicate[src]

pub fn matches<P: Pattern>(&self, pattern: &P) -> bool[src]

Returns true if configuration matches the predicate

Trait Implementations

impl PartialEq<Predicate> for Predicate[src]

impl AsRef<Predicate> for Cfg[src]

impl From<Predicate> for Cfg[src]

impl From<Cfg> for Predicate[src]

impl Clone for Predicate[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl AsMut<Predicate> for Cfg[src]

impl Debug for Predicate[src]

impl Display for Predicate[src]

impl Hash for Predicate[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Predicate

impl Sync for Predicate

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.

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

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

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