Struct rustc_data_structures::graph::implementation::Graph [−][src]
pub struct Graph<N, E> {
nodes: SnapshotVec<Node<N>>,
edges: SnapshotVec<Edge<E>>,
}
Fields
nodes: SnapshotVec<Node<N>>
edges: SnapshotVec<Edge<E>>
Implementations
Iterates over all edges defined in the graph.
Iterates over all edges defined in the graph
pub fn outgoing_edges(&self, source: NodeIndex) -> AdjacentEdges<'_, N, E>ⓘNotable traits for AdjacentEdges<'g, N, E>impl<'g, N: Debug, E: Debug> Iterator for AdjacentEdges<'g, N, E> type Item = (EdgeIndex, &'g Edge<E>);
Notable traits for AdjacentEdges<'g, N, E>
impl<'g, N: Debug, E: Debug> Iterator for AdjacentEdges<'g, N, E> type Item = (EdgeIndex, &'g Edge<E>);
pub fn incoming_edges(&self, source: NodeIndex) -> AdjacentEdges<'_, N, E>ⓘNotable traits for AdjacentEdges<'g, N, E>impl<'g, N: Debug, E: Debug> Iterator for AdjacentEdges<'g, N, E> type Item = (EdgeIndex, &'g Edge<E>);
Notable traits for AdjacentEdges<'g, N, E>
impl<'g, N: Debug, E: Debug> Iterator for AdjacentEdges<'g, N, E> type Item = (EdgeIndex, &'g Edge<E>);
pub fn adjacent_edges(
&self,
source: NodeIndex,
direction: Direction
) -> AdjacentEdges<'_, N, E>ⓘNotable traits for AdjacentEdges<'g, N, E>impl<'g, N: Debug, E: Debug> Iterator for AdjacentEdges<'g, N, E> type Item = (EdgeIndex, &'g Edge<E>);
Notable traits for AdjacentEdges<'g, N, E>
impl<'g, N: Debug, E: Debug> Iterator for AdjacentEdges<'g, N, E> type Item = (EdgeIndex, &'g Edge<E>);
pub fn successor_nodes<'a>(
&'a self,
source: NodeIndex
) -> impl Iterator<Item = NodeIndex> + 'a
pub fn predecessor_nodes<'a>(
&'a self,
target: NodeIndex
) -> impl Iterator<Item = NodeIndex> + 'a
pub fn depth_traverse(
&self,
start: NodeIndex,
direction: Direction
) -> DepthFirstTraversal<'_, N, E>ⓘNotable traits for DepthFirstTraversal<'g, N, E>impl<'g, N: Debug, E: Debug> Iterator for DepthFirstTraversal<'g, N, E> type Item = NodeIndex;
Notable traits for DepthFirstTraversal<'g, N, E>
impl<'g, N: Debug, E: Debug> Iterator for DepthFirstTraversal<'g, N, E> type Item = NodeIndex;
Auto Trait Implementations
impl<N, E> RefUnwindSafe for Graph<N, E> where
E: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, E> UnwindSafe for Graph<N, E> where
E: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 112 bytes