bevy_render/render_graph/
mod.rs

1mod app;
2mod context;
3mod edge;
4mod graph;
5mod node;
6mod node_slot;
7
8pub use app::*;
9pub use context::*;
10pub use edge::*;
11pub use graph::*;
12pub use node::*;
13pub use node_slot::*;
14
15use derive_more::derive::{Display, Error};
16
17#[derive(Error, Display, Debug, Eq, PartialEq)]
18pub enum RenderGraphError {
19    #[display("node {_0:?} does not exist")]
20    #[error(ignore)]
21    InvalidNode(InternedRenderLabel),
22    #[display("output node slot does not exist")]
23    #[error(ignore)]
24    InvalidOutputNodeSlot(SlotLabel),
25    #[display("input node slot does not exist")]
26    #[error(ignore)]
27    InvalidInputNodeSlot(SlotLabel),
28    #[display("node does not match the given type")]
29    WrongNodeType,
30    #[display("attempted to connect output slot {output_slot} from node {output_node:?} to incompatible input slot {input_slot} from node {input_node:?}")]
31    MismatchedNodeSlots {
32        output_node: InternedRenderLabel,
33        output_slot: usize,
34        input_node: InternedRenderLabel,
35        input_slot: usize,
36    },
37    #[display("attempted to add an edge that already exists")]
38    #[error(ignore)]
39    EdgeAlreadyExists(Edge),
40    #[display("attempted to remove an edge that does not exist")]
41    #[error(ignore)]
42    EdgeDoesNotExist(Edge),
43    #[display("node {node:?} has an unconnected input slot {input_slot}")]
44    UnconnectedNodeInputSlot {
45        node: InternedRenderLabel,
46        input_slot: usize,
47    },
48    #[display("node {node:?} has an unconnected output slot {output_slot}")]
49    UnconnectedNodeOutputSlot {
50        node: InternedRenderLabel,
51        output_slot: usize,
52    },
53    #[display("node {node:?} input slot {input_slot} already occupied by {occupied_by_node:?}")]
54    NodeInputSlotAlreadyOccupied {
55        node: InternedRenderLabel,
56        input_slot: usize,
57        occupied_by_node: InternedRenderLabel,
58    },
59}