[−][src]Enum rustdoc::clean::cfg::Cfg
Variants
True
Accepts all configurations.
False
Denies all configurations.
Cfg(Symbol, Option<Symbol>)
A generic configuration option, e.g. test
or target_os = "linux"
.
Not(Box<Cfg>)
Negate a configuration requirement, i.e. not(x)
.
Any(Vec<Cfg>)
Union of a list of configuration requirements, i.e. any(...)
.
All(Vec<Cfg>)
Intersection of a list of configuration requirements, i.e. all(...)
.
Methods
impl Cfg
[src]
impl Cfg
fn parse_nested(nested_cfg: &NestedMetaItem) -> Result<Cfg, InvalidCfgError>
[src]
fn parse_nested(nested_cfg: &NestedMetaItem) -> Result<Cfg, InvalidCfgError>
Parses a NestedMetaItem
into a Cfg
.
pub fn parse(cfg: &MetaItem) -> Result<Cfg, InvalidCfgError>
[src]
pub fn parse(cfg: &MetaItem) -> Result<Cfg, InvalidCfgError>
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.
pub fn matches(
&self,
parse_sess: &ParseSess,
features: Option<&Features>
) -> bool
[src]
pub fn matches(
&self,
parse_sess: &ParseSess,
features: Option<&Features>
) -> bool
Checks whether the given configuration can be matched in the current session.
Equivalent to attr::cfg_matches
.
fn is_simple(&self) -> bool
[src]
fn is_simple(&self) -> bool
Whether the configuration consists of just Cfg
or Not
.
fn is_all(&self) -> bool
[src]
fn is_all(&self) -> bool
Whether the configuration consists of just Cfg
, Not
or All
.
pub(crate) fn render_short_html(&self) -> String
[src]
pub(crate) fn render_short_html(&self) -> String
Renders the configuration for human display, as a short HTML description.
pub(crate) fn render_long_html(&self) -> String
[src]
pub(crate) fn render_long_html(&self) -> String
Renders the configuration for long display, as a long HTML description.
fn should_capitalize_first_letter(&self) -> bool
[src]
fn should_capitalize_first_letter(&self) -> bool
fn should_append_only_to_description(&self) -> bool
[src]
fn should_append_only_to_description(&self) -> bool
fn should_use_with_in_description(&self) -> bool
[src]
fn should_use_with_in_description(&self) -> bool
Trait Implementations
impl Clone for Cfg
[src]
impl Clone for Cfg
fn clone(&self) -> Cfg
[src]
fn clone(&self) -> Cfg
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Encodable for Cfg
[src]
impl Encodable for Cfg
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
[src]
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
🔬 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]
impl Decodable for Cfg
fn decode<__D: Decoder>(d: &mut __D) -> Result<Cfg, __D::Error>
[src]
fn decode<__D: Decoder>(d: &mut __D) -> Result<Cfg, __D::Error>
🔬 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]
impl Debug for Cfg
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Cfg
[src]
impl PartialEq for Cfg
fn eq(&self, other: &Cfg) -> bool
[src]
fn eq(&self, other: &Cfg) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Cfg) -> bool
[src]
fn ne(&self, other: &Cfg) -> bool
This method tests for !=
.
impl Eq for Cfg
[src]
impl Eq for Cfg
fn assert_receiver_is_total_eq(&self)
[src]
fn assert_receiver_is_total_eq(&self)
impl Hash for Cfg
[src]
impl Hash for Cfg
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Not for Cfg
[src]
impl Not for Cfg
type Output = Cfg
The resulting type after applying the !
operator.
fn not(self) -> Cfg
[src]
fn not(self) -> Cfg
Performs the unary !
operation.
impl BitAndAssign for Cfg
[src]
impl BitAndAssign for Cfg
fn bitand_assign(&mut self, other: Cfg)
[src]
fn bitand_assign(&mut self, other: Cfg)
Performs the &=
operation.
impl BitAnd for Cfg
[src]
impl BitAnd for Cfg
type Output = Cfg
The resulting type after applying the &
operator.
fn bitand(self, other: Cfg) -> Cfg
[src]
fn bitand(self, other: Cfg) -> Cfg
Performs the &
operation.
impl BitOrAssign for Cfg
[src]
impl BitOrAssign for Cfg
fn bitor_assign(&mut self, other: Cfg)
[src]
fn bitor_assign(&mut self, other: Cfg)
Performs the |=
operation.
impl BitOr for Cfg
[src]
impl BitOr for Cfg
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 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]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 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]
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
fn encode<E>(&self, e: &mut E) -> Result<(), <E as Encoder>::Error> where
E: Encoder,
[src]
fn encode<E>(&self, e: &mut E) -> Result<(), <E as Encoder>::Error> where
E: Encoder,
🔬 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]
impl<T> Decodable for T where
T: UseSpecializedDecodable,
fn decode<D>(d: &mut D) -> Result<T, <D as Decoder>::Error> where
D: Decoder,
[src]
fn decode<D>(d: &mut D) -> Result<T, <D as Decoder>::Error> where
D: Decoder,
🔬 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]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 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> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T
impl<T> MaybeResult for T
[src]
impl<T> MaybeResult for T
fn from_ok(x: T) -> T
[src]
fn from_ok(x: T) -> T
🔬 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?
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
[src]
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
🔬 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]
impl<'a, T> Captures for T where
T: ?Sized,