2020-07-17 01:26:21 +00:00
|
|
|
pub mod base;
|
2020-04-25 00:46:54 +00:00
|
|
|
mod command;
|
2020-04-25 01:55:15 +00:00
|
|
|
mod edge;
|
2020-04-25 00:46:54 +00:00
|
|
|
mod graph;
|
|
|
|
mod node;
|
|
|
|
mod node_slot;
|
2020-07-17 01:26:21 +00:00
|
|
|
mod nodes;
|
2020-04-25 00:46:54 +00:00
|
|
|
mod schedule;
|
2020-07-17 01:26:21 +00:00
|
|
|
mod system;
|
|
|
|
|
2020-04-25 00:46:54 +00:00
|
|
|
pub use command::*;
|
2020-04-25 01:55:15 +00:00
|
|
|
pub use edge::*;
|
2020-04-25 00:46:54 +00:00
|
|
|
pub use graph::*;
|
|
|
|
pub use node::*;
|
|
|
|
pub use node_slot::*;
|
2020-07-17 01:26:21 +00:00
|
|
|
pub use nodes::*;
|
2020-04-25 00:46:54 +00:00
|
|
|
pub use schedule::*;
|
2020-07-17 01:26:21 +00:00
|
|
|
pub use system::*;
|
2019-12-02 04:03:04 +00:00
|
|
|
|
2020-04-25 00:46:54 +00:00
|
|
|
use thiserror::Error;
|
|
|
|
|
|
|
|
#[derive(Error, Debug, Eq, PartialEq)]
|
|
|
|
pub enum RenderGraphError {
|
|
|
|
#[error("Node does not exist")]
|
|
|
|
InvalidNode(NodeLabel),
|
|
|
|
#[error("Node slot does not exist")]
|
|
|
|
InvalidNodeSlot(SlotLabel),
|
|
|
|
#[error("Node does not match the given type")]
|
|
|
|
WrongNodeType,
|
|
|
|
#[error("Attempted to connect a node output slot to an incompatible input node slot")]
|
|
|
|
MismatchedNodeSlots {
|
|
|
|
output_node: NodeId,
|
|
|
|
output_slot: usize,
|
|
|
|
input_node: NodeId,
|
|
|
|
input_slot: usize,
|
|
|
|
},
|
|
|
|
#[error("Attempted to add an edge that already exists")]
|
|
|
|
EdgeAlreadyExists(Edge),
|
|
|
|
#[error("Node has an unconnected input slot.")]
|
|
|
|
UnconnectedNodeInputSlot { node: NodeId, input_slot: usize },
|
|
|
|
#[error("Node has an unconnected output slot.")]
|
|
|
|
UnconnectedNodeOutputSlot { node: NodeId, output_slot: usize },
|
|
|
|
#[error("Node input slot already occupied")]
|
2020-04-25 01:55:15 +00:00
|
|
|
NodeInputSlotAlreadyOccupied {
|
|
|
|
node: NodeId,
|
|
|
|
input_slot: usize,
|
|
|
|
occupied_by_node: NodeId,
|
|
|
|
},
|
|
|
|
}
|