Struct guppy::graph::feature::feature_list::FeatureList [−][src]
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]
package: PackageMetadata<'g>,
features: impl IntoIterator<Item = Option<&'g str>>
) -> Self
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]ⓘ
[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>ⓘ
[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]
fn clone(&self) -> FeatureList<'g>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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?
fn into_iter(self) -> Self::IntoIter
[src]
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?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'g> PartialEq<FeatureList<'g>> for FeatureList<'g>
[src]
fn eq(&self, other: &FeatureList<'g>) -> bool
[src]
fn ne(&self, other: &FeatureList<'g>) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
[src]
T: 'a + Clone + Send + Sync,
pub fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
[src]
pub fn self_address_mut(&mut self) -> *mut ()
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
[src]
T: 'a + Clone,
pub fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
[src]
pub fn self_address_mut(&mut self) -> *mut ()
[src]
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> SafeBorrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_replacement(ptr: &T) -> &T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,