Skip to content

Commit

Permalink
expose subgraph iterator (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann authored Jul 14, 2021
1 parent fb804e0 commit b340e2d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pipelined/bevy_render2/src/render_graph/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,18 @@ impl RenderGraph {
self.nodes.values_mut()
}

pub fn iter_sub_graphs(&self) -> impl Iterator<Item = (&str, &RenderGraph)> {
self.sub_graphs
.iter()
.map(|(name, graph)| (name.as_ref(), graph))
}

pub fn iter_sub_graphs_mut(&mut self) -> impl Iterator<Item = (&str, &mut RenderGraph)> {
self.sub_graphs
.iter_mut()
.map(|(name, graph)| (name.as_ref(), graph))
}

pub fn iter_node_inputs(
&self,
label: impl Into<NodeLabel>,
Expand Down

0 comments on commit b340e2d

Please sign in to comment.