pub trait GraphTraversal: GraphStore + Sized {
// Required methods
fn visit<VisitImpl, Abort, Impl>(
self,
root_edges: impl IntoIterator<Item = VisitImpl::Edge>,
visit: VisitImpl,
) -> impl Future<Output = GraphTraversalResult<Result<Self>, Abort>> + Send
where VisitImpl: Visit<Self::Node, Abort, Impl> + Send,
Abort: Send,
Impl: Send;
fn skip_duplicates(self) -> SkipDuplicates<Self>;
fn skip_duplicates_with_visited_nodes(
self,
visited: VisitedNodes<Self::Node>,
) -> SkipDuplicates<Self>;
fn skip_duplicates_with_key<Key: Send + Eq + Hash + Clone, KeyExtractor: Send + Fn(&Self::Node) -> &Key>(
self,
key_extractor: KeyExtractor,
) -> SkipDuplicatesWithKey<Self, Key, KeyExtractor>;
}
Expand description
GraphTraversal
is a utility type that can be used to traverse a graph of
nodes, where each node can have a variable number of outgoing edges.
The traversal is done in parallel, and the order of the nodes in the traversal
result is determined by the GraphStore
parameter.
Required Methods§
fn visit<VisitImpl, Abort, Impl>( self, root_edges: impl IntoIterator<Item = VisitImpl::Edge>, visit: VisitImpl, ) -> impl Future<Output = GraphTraversalResult<Result<Self>, Abort>> + Send
fn skip_duplicates(self) -> SkipDuplicates<Self>
fn skip_duplicates_with_visited_nodes( self, visited: VisitedNodes<Self::Node>, ) -> SkipDuplicates<Self>
fn skip_duplicates_with_key<Key: Send + Eq + Hash + Clone, KeyExtractor: Send + Fn(&Self::Node) -> &Key>( self, key_extractor: KeyExtractor, ) -> SkipDuplicatesWithKey<Self, Key, KeyExtractor>
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.