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

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 configuration 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

Blanket Implementations

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

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Important traits for &'a mut R

Immutably borrows from an owned value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Important traits for &'a mut R

Mutably borrows from an owned value. Read more

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[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<T> Decodable for T where
    T: UseSpecializedDecodable
[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<E> SpecializationError for E
[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?

Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S is the encoder/decoder state type, T is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more

impl<T> Erased for T
[src]

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

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

impl<T> Erased for T

impl<T> MaybeResult for T
[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?

🔬 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<'a, T> Captures for T where
    T: ?Sized
[src]