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§
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 Methods§
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.