Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_render/src/render_graph/mod.rs
6596 views
1
mod app;
2
mod camera_driver_node;
3
mod context;
4
mod edge;
5
mod graph;
6
mod node;
7
mod node_slot;
8
9
pub use app::*;
10
pub use camera_driver_node::*;
11
pub use context::*;
12
pub use edge::*;
13
pub use graph::*;
14
pub use node::*;
15
pub use node_slot::*;
16
17
use thiserror::Error;
18
19
#[derive(Error, Debug, Eq, PartialEq)]
20
pub 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
}
57
58