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§
Required Associated Types§
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>
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, )
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.