Enum rustdoc::clean::cfg::Cfg[][src]

pub enum Cfg {
    True,
    False,
    Cfg(SymbolOption<Symbol>),
    Not(Box<Cfg>),
    Any(Vec<Cfg>),
    All(Vec<Cfg>),
}

Variants

Accepts all configurations.

Denies all configurations.

A generic configration option, e.g. test or target_os = "linux".

Negate a configuration requirement, i.e. not(x).

Union of a list of configuration requirements, i.e. any(...).

Intersection of a list of configuration requirements, i.e. all(...).

Methods

impl Cfg
[src]

Parses a NestedMetaItem into a Cfg.

Parses a MetaItem into a Cfg.

The MetaItem should be the content of the #[cfg(...)], e.g. unix or target_os = "redox".

If the content is not properly formatted, it will return an error indicating what and where the error is.

Checks whether the given configuration can be matched in the current session.

Equivalent to attr::cfg_matches.

Whether the configuration consists of just Cfg or Not.

Whether the configuration consists of just Cfg, Not or All.

Renders the configuration for human display, as a short HTML description.

Renders the configuration for long display, as a long HTML description.

Trait Implementations

impl Clone for Cfg
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Encodable for Cfg
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

impl Decodable for Cfg
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

impl Debug for Cfg
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Cfg
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Cfg
[src]

impl Hash for Cfg
[src]

Feeds this value into the given [Hasher]. Read more

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

impl Not for Cfg
[src]

The resulting type after applying the ! operator.

Performs the unary ! operation.

impl BitAndAssign for Cfg
[src]

Performs the &= operation.

impl BitAnd for Cfg
[src]

The resulting type after applying the & operator.

Performs the & operation.

impl BitOrAssign for Cfg
[src]

Performs the |= operation.

impl BitOr for Cfg
[src]

The resulting type after applying the | operator.

Performs the | operation.

Auto Trait Implementations

impl !Send for Cfg

impl !Sync for Cfg