[][src]Struct runtime_cfg::Cfg

pub struct Cfg(_);

Boolean evaluation of configuration flags, at runtime-time.

Methods

impl Cfg[src]

pub fn find<'ast>(
    attrs: impl IntoIterator<Item = &'ast Attribute>
) -> Option<Cfg>
[src]

Find and parse the cfg attribute

pub fn parse<S: AsRef<str>>(s: S) -> Result<Self>[src]

Parse the cfg attribute from meta

Methods from Deref<Target = Predicate>

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

Returns true if configuration matches the predicate

Trait Implementations

impl PartialEq<Cfg> for Cfg[src]

impl AsRef<Predicate> for Cfg[src]

impl From<Predicate> for Cfg[src]

impl From<Cfg> for Predicate[src]

impl Clone for Cfg[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 DerefMut for Cfg[src]

impl Debug for Cfg[src]

impl Display for Cfg[src]

impl FromStr for Cfg[src]

type Err = Error

The associated error which can be returned from parsing.

impl TryFrom<TokenStream> for Cfg[src]

type Error = Error

The type returned in the event of a conversion error.

impl<'ast> TryFrom<&'ast Attribute> for Cfg[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Attribute> for Cfg[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<Meta> for Cfg[src]

type Error = Error

The type returned in the event of a conversion error.

impl Deref for Cfg[src]

type Target = Predicate

The resulting type after dereferencing.

impl Hash for Cfg[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

impl Parse for Cfg[src]

Auto Trait Implementations

impl Send for Cfg

impl Sync for Cfg

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]