pub trait ComputeGraph {
type Edge: GraphEntry;
type Node: GraphEntry;
// Required methods
fn add_node(
&mut self,
node: <Self::Node as GraphEntry>::Weight,
) -> <Self::Node as GraphEntry>::Idx;
fn add_edge(
&mut self,
src: <Self::Node as GraphEntry>::Idx,
target: <Self::Node as GraphEntry>::Idx,
weight: <Self::Edge as GraphEntry>::Weight,
) -> <Self::Edge as GraphEntry>::Idx;
fn clear(&mut self);
}Required Associated Types§
type Edge: GraphEntry
type Node: GraphEntry
Required Methods§
fn add_node( &mut self, node: <Self::Node as GraphEntry>::Weight, ) -> <Self::Node as GraphEntry>::Idx
fn add_edge( &mut self, src: <Self::Node as GraphEntry>::Idx, target: <Self::Node as GraphEntry>::Idx, weight: <Self::Edge as GraphEntry>::Weight, ) -> <Self::Edge as GraphEntry>::Idx
fn clear(&mut self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".