struct Requirements<'a> {
summary: &'a Summary,
deps: HashMap<InternedString, BTreeSet<InternedString>>,
features: HashSet<InternedString>,
}
Expand description
Set of feature and dependency requirements for a package.
Fields§
§summary: &'a Summary
§deps: HashMap<InternedString, BTreeSet<InternedString>>
The deps map is a mapping of dependency name to list of features enabled.
The resolver will activate all of these dependencies, with the given features enabled.
features: HashSet<InternedString>
The set of features enabled on this package which is later used when compiling to instruct the code what features were enabled.
Implementations§
Source§impl Requirements<'_>
impl Requirements<'_>
fn new(summary: &Summary) -> Requirements<'_>
fn into_features(self) -> HashSet<InternedString>
fn require_dep_feature( &mut self, package: InternedString, feat: InternedString, weak: bool, ) -> Result<(), RequirementError>
fn require_dependency(&mut self, pkg: InternedString)
fn require_feature( &mut self, feat: InternedString, ) -> Result<(), RequirementError>
fn require_value(&mut self, fv: &FeatureValue) -> Result<(), RequirementError>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Requirements<'a>
impl<'a> RefUnwindSafe for Requirements<'a>
impl<'a> Send for Requirements<'a>
impl<'a> Sync for Requirements<'a>
impl<'a> Unpin for Requirements<'a>
impl<'a> UnwindSafe for Requirements<'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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes