Trait GraphSet

Source
pub trait GraphSet<'g>: Clone + Debug {
    type Id: Copy + Eq + Hash + Debug;
    type Metadata: GraphMetadata<'g, Id = Self::Id>;

    // Required methods
    fn len(&self) -> usize;
    fn contains(&self, id: Self::Id) -> bool;
    fn union(&self, other: &Self) -> Self;
    fn intersection(&self, other: &Self) -> Self;
    fn difference(&self, other: &Self) -> Self;
    fn symmetric_difference(&self, other: &Self) -> Self;
    fn ids(&self, direction: DependencyDirection) -> Vec<Self::Id>;
    fn metadatas(&self, direction: DependencyDirection) -> Vec<Self::Metadata>;
    fn root_ids(&self, direction: DependencyDirection) -> Vec<Self::Id>;
    fn root_metadatas(
        &self,
        direction: DependencyDirection,
    ) -> Vec<Self::Metadata>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Associated Types§

Source

type Id: Copy + Eq + Hash + Debug

Source

type Metadata: GraphMetadata<'g, Id = Self::Id>

Required Methods§

Source

fn len(&self) -> usize

Source

fn contains(&self, id: Self::Id) -> bool

Source

fn union(&self, other: &Self) -> Self

Source

fn intersection(&self, other: &Self) -> Self

Source

fn difference(&self, other: &Self) -> Self

Source

fn symmetric_difference(&self, other: &Self) -> Self

Source

fn ids(&self, direction: DependencyDirection) -> Vec<Self::Id>

Source

fn metadatas(&self, direction: DependencyDirection) -> Vec<Self::Metadata>

Source

fn root_ids(&self, direction: DependencyDirection) -> Vec<Self::Id>

Source

fn root_metadatas(&self, direction: DependencyDirection) -> Vec<Self::Metadata>

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'g> GraphSet<'g> for FeatureSet<'g>

Source§

type Id = FeatureId<'g>

Source§

type Metadata = FeatureMetadata<'g>

Source§

fn len(&self) -> usize

Source§

fn contains(&self, id: Self::Id) -> bool

Source§

fn union(&self, other: &Self) -> Self

Source§

fn intersection(&self, other: &Self) -> Self

Source§

fn difference(&self, other: &Self) -> Self

Source§

fn symmetric_difference(&self, other: &Self) -> Self

Source§

fn ids(&self, direction: DependencyDirection) -> Vec<Self::Id>

Source§

fn metadatas(&self, direction: DependencyDirection) -> Vec<Self::Metadata>

Source§

fn root_ids(&self, direction: DependencyDirection) -> Vec<Self::Id>

Source§

fn root_metadatas(&self, direction: DependencyDirection) -> Vec<Self::Metadata>

Source§

impl<'g> GraphSet<'g> for PackageSet<'g>

Source§

type Id = &'g PackageId

Source§

type Metadata = PackageMetadata<'g>

Source§

fn len(&self) -> usize

Source§

fn contains(&self, id: Self::Id) -> bool

Source§

fn union(&self, other: &Self) -> Self

Source§

fn intersection(&self, other: &Self) -> Self

Source§

fn difference(&self, other: &Self) -> Self

Source§

fn symmetric_difference(&self, other: &Self) -> Self

Source§

fn ids(&self, direction: DependencyDirection) -> Vec<Self::Id>

Source§

fn metadatas(&self, direction: DependencyDirection) -> Vec<Self::Metadata>

Source§

fn root_ids(&self, direction: DependencyDirection) -> Vec<Self::Id>

Source§

fn root_metadatas(&self, direction: DependencyDirection) -> Vec<Self::Metadata>

Implementors§