Implement node registry (#822)

This commit is contained in:
TrueDoctor
2022-10-26 00:32:50 +02:00
committed by Keavon Chambers
parent c3fbc4eac9
commit 11c6413251
10 changed files with 213 additions and 45 deletions

View File

@@ -198,6 +198,15 @@ impl NodeInput {
}
}
impl ProtoNodeInput {
pub fn unwrap_node(self) -> NodeId {
match self {
ProtoNodeInput::Node(id) => id,
_ => panic!("tried to unwrap id from non node input"),
}
}
}
impl ProtoNode {
pub fn id() -> Self {
Self {