Trait GraphAssert

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

    const NAME: &'static str;
Show 13 methods // Required methods fn depends_on(&self, a_id: Self::Id, b_id: Self::Id) -> Result<bool, Error>; fn directly_depends_on( &self, a_id: Self::Id, b_id: Self::Id, ) -> Result<bool, Error>; fn is_cyclic(&self, a_id: Self::Id, b_id: Self::Id) -> Result<bool, Error>; fn query( &self, initials: impl IntoIterator<Item = Self::Id>, direction: DependencyDirection, ) -> Self::Query; // Provided methods fn resolve( &self, initials: &[Self::Id], direction: DependencyDirection, ) -> Self::Set { ... } fn ids( &self, initials: &[Self::Id], query_direction: DependencyDirection, iter_direction: DependencyDirection, ) -> Vec<Self::Id> { ... } fn root_ids( &self, initials: &[Self::Id], query_direction: DependencyDirection, iter_direction: DependencyDirection, ) -> Vec<Self::Id> { ... } fn root_metadatas( &self, initials: &[Self::Id], query_direction: DependencyDirection, iter_direction: DependencyDirection, ) -> Vec<Self::Metadata> { ... } fn assert_topo_order( &self, topo_ids: impl IntoIterator<Item = Self::Id>, direction: DependencyDirection, msg: &str, ) { ... } fn assert_depends_on_any( &self, source_ids: &[Self::Id], query_id: Self::Id, direction: DependencyDirection, msg: &str, ) { ... } fn assert_depends_on( &self, a_id: Self::Id, b_id: Self::Id, direction: DependencyDirection, msg: &str, ) { ... } fn assert_not_depends_on( &self, a_id: Self::Id, b_id: Self::Id, direction: DependencyDirection, msg: &str, ) { ... } fn assert_directly_depends_on( &self, a_id: Self::Id, b_id: Self::Id, direction: DependencyDirection, msg: &str, ) { ... }
}

Required Associated Constants§

Source

const NAME: &'static str

Required Associated Types§

Source

type Id: Copy + Eq + Hash + Debug

Source

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

Source

type Query: GraphQuery<'g, Id = Self::Id, Set = Self::Set>

Source

type Set: GraphSet<'g, Id = Self::Id, Metadata = Self::Metadata>

Required Methods§

Source

fn depends_on(&self, a_id: Self::Id, b_id: Self::Id) -> Result<bool, Error>

Source

fn directly_depends_on( &self, a_id: Self::Id, b_id: Self::Id, ) -> Result<bool, Error>

Source

fn is_cyclic(&self, a_id: Self::Id, b_id: Self::Id) -> Result<bool, Error>

Source

fn query( &self, initials: impl IntoIterator<Item = Self::Id>, direction: DependencyDirection, ) -> Self::Query

Provided Methods§

Source

fn resolve( &self, initials: &[Self::Id], direction: DependencyDirection, ) -> Self::Set

Source

fn ids( &self, initials: &[Self::Id], query_direction: DependencyDirection, iter_direction: DependencyDirection, ) -> Vec<Self::Id>

Source

fn root_ids( &self, initials: &[Self::Id], query_direction: DependencyDirection, iter_direction: DependencyDirection, ) -> Vec<Self::Id>

Source

fn root_metadatas( &self, initials: &[Self::Id], query_direction: DependencyDirection, iter_direction: DependencyDirection, ) -> Vec<Self::Metadata>

Source

fn assert_topo_order( &self, topo_ids: impl IntoIterator<Item = Self::Id>, direction: DependencyDirection, msg: &str, )

Source

fn assert_depends_on_any( &self, source_ids: &[Self::Id], query_id: Self::Id, direction: DependencyDirection, msg: &str, )

Source

fn assert_depends_on( &self, a_id: Self::Id, b_id: Self::Id, direction: DependencyDirection, msg: &str, )

Source

fn assert_not_depends_on( &self, a_id: Self::Id, b_id: Self::Id, direction: DependencyDirection, msg: &str, )

Source

fn assert_directly_depends_on( &self, a_id: Self::Id, b_id: Self::Id, direction: DependencyDirection, msg: &str, )

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> GraphAssert<'g> for &'g PackageGraph

Source§

const NAME: &'static str = "package"

Source§

type Id = &'g PackageId

Source§

type Metadata = PackageMetadata<'g>

Source§

type Query = PackageQuery<'g>

Source§

type Set = PackageSet<'g>

Source§

fn depends_on(&self, a_id: Self::Id, b_id: Self::Id) -> Result<bool, Error>

Source§

fn directly_depends_on( &self, a_id: Self::Id, b_id: Self::Id, ) -> Result<bool, Error>

Source§

fn is_cyclic(&self, a_id: Self::Id, b_id: Self::Id) -> Result<bool, Error>

Source§

fn query( &self, initials: impl IntoIterator<Item = Self::Id>, direction: DependencyDirection, ) -> Self::Query

Source§

impl<'g> GraphAssert<'g> for FeatureGraph<'g>

Source§

const NAME: &'static str = "feature"

Source§

type Id = FeatureId<'g>

Source§

type Metadata = FeatureMetadata<'g>

Source§

type Query = FeatureQuery<'g>

Source§

type Set = FeatureSet<'g>

Source§

fn depends_on(&self, a_id: Self::Id, b_id: Self::Id) -> Result<bool, Error>

Source§

fn directly_depends_on( &self, a_id: Self::Id, b_id: Self::Id, ) -> Result<bool, Error>

Source§

fn is_cyclic(&self, a_id: Self::Id, b_id: Self::Id) -> Result<bool, Error>

Source§

fn query( &self, initials: impl IntoIterator<Item = Self::Id>, direction: DependencyDirection, ) -> Self::Query

Implementors§