Struct guppy::graph::feature::feature_list::FeatureList[][src]

pub struct FeatureList<'g> { /* fields omitted */ }

A sorted, deduplicated list of features from a single package.

This provides a convenient way to query and print out lists of features.

Returned by methods on FeatureSet.

Implementations

impl<'g> FeatureList<'g>[src]

pub fn new(
    package: PackageMetadata<'g>,
    features: impl IntoIterator<Item = Option<&'g str>>
) -> Self
[src]

Creates a new FeatureList from a package and an iterator over features.

pub fn package(&self) -> &PackageMetadata<'g>[src]

Returns the package corresponding to this feature list.

pub fn contains(&self, feature: impl AsRef<str>) -> bool[src]

Returns true if this feature list contains this feature.

pub fn has_base(&self) -> bool[src]

Returns true if this feature list contains the "base" feature.

The "base" feature represents the package with no features enabled.

pub fn features(&self) -> &[&'g str]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns the list of features as a slice.

This slice is guaranteed to be sorted and unique.

pub fn iter<'a>(&'a self) -> Iter<'g, 'a>

Notable traits for Iter<'g, 'a>

impl<'g, 'a> Iterator for Iter<'g, 'a> type Item = FeatureId<'g>;
[src]

Returns a borrowed iterator over feature IDs.

pub fn display_features<'a>(&'a self) -> DisplayFeatures<'g, 'a>[src]

Returns a pretty-printer over the list of features.

pub fn into_features(self) -> Vec<&'g str>[src]

Returns a vector of feature names.

The vector is guaranteed to be sorted and unique.

Trait Implementations

impl<'g> Clone for FeatureList<'g>[src]

impl<'g> Debug for FeatureList<'g>[src]

impl<'g> Eq for FeatureList<'g>[src]

impl<'g> IntoIterator for FeatureList<'g>[src]

type Item = FeatureId<'g>

The type of the elements being iterated over.

type IntoIter = IntoIter<'g>

Which kind of iterator are we turning this into?

impl<'a, 'g> IntoIterator for &'a FeatureList<'g>[src]

type Item = FeatureId<'g>

The type of the elements being iterated over.

type IntoIter = Iter<'g, 'a>

Which kind of iterator are we turning this into?

impl<'g> PartialEq<FeatureList<'g>> for FeatureList<'g>[src]

impl<'g> StructuralEq for FeatureList<'g>[src]

impl<'g> StructuralPartialEq for FeatureList<'g>[src]

Auto Trait Implementations

impl<'g> RefUnwindSafe for FeatureList<'g>[src]

impl<'g> Send for FeatureList<'g>[src]

impl<'g> Sync for FeatureList<'g>[src]

impl<'g> Unpin for FeatureList<'g>[src]

impl<'g> UnwindSafe for FeatureList<'g>[src]

Blanket Implementations

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

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

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

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

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

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,