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