pub struct Config<'a> {
pub idents: HashSet<Cow<'a, str>>,
pub name_values: HashSet<(Cow<'a, str>, Cow<'a, str>)>,
}
Expand description
A set of enabled named and key-value configuration options.
Fields§
§idents: HashSet<Cow<'a, str>>
Enabled named configuration options.
name_values: HashSet<(Cow<'a, str>, Cow<'a, str>)>
Enabled key-value configuration options.
Implementations§
Source§impl<'a> Config<'a>
impl<'a> Config<'a>
Sourcepub fn from_package_docs_rs_features(package: &'a Package) -> Self
pub fn from_package_docs_rs_features(package: &'a Package) -> Self
Creates a Config
with features defined in [package.metadata.docs.rs]
table in crates’ Cargo.toml.
Sourcepub fn with_features<I, T>(self, features: I) -> Self
pub fn with_features<I, T>(self, features: I) -> Self
Extend Config
with the feature names from an iterator.
Sourcepub fn with_target_arch_os_env(self, target: &str) -> Self
pub fn with_target_arch_os_env(self, target: &str) -> Self
Add target_arch, target_os and target_env Config
options from the specified target.
This method require non-default feature platforms
.
Trait Implementations§
impl<'a> Eq for Config<'a>
impl<'a> StructuralPartialEq for Config<'a>
Auto Trait Implementations§
impl<'a> Freeze for Config<'a>
impl<'a> RefUnwindSafe for Config<'a>
impl<'a> Send for Config<'a>
impl<'a> Sync for Config<'a>
impl<'a> Unpin for Config<'a>
impl<'a> UnwindSafe for Config<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.