Some initial testing on dynamic nodes and composition

* Test use of borrow stack
This commit is contained in:
0hypercube
2022-09-28 18:47:34 +01:00
committed by Keavon Chambers
parent 2ced9a57c4
commit cef58b16c2
8 changed files with 220 additions and 9 deletions

View File

@@ -37,9 +37,9 @@ fn merge_ids(a: u64, b: u64) -> u64 {
#[derive(Debug, PartialEq)]
pub struct DocumentNode {
name: String,
inputs: Vec<NodeInput>,
implementation: DocumentNodeImplementation,
pub name: String,
pub inputs: Vec<NodeInput>,
pub implementation: DocumentNodeImplementation,
}
impl DocumentNode {
@@ -114,9 +114,9 @@ pub enum DocumentNodeImplementation {
#[derive(Debug, Default, PartialEq)]
pub struct NodeNetwork {
inputs: Vec<NodeId>,
output: NodeId,
nodes: HashMap<NodeId, DocumentNode>,
pub inputs: Vec<NodeId>,
pub output: NodeId,
pub nodes: HashMap<NodeId, DocumentNode>,
}
pub type Value = Box<dyn ValueTrait>;
pub trait ValueTrait: DynAny<'static> + std::fmt::Debug {}
@@ -177,9 +177,9 @@ impl PartialEq for ConstructionArgs {
#[derive(Debug, Default, PartialEq)]
pub struct ProtoNode {
construction_args: ConstructionArgs,
input: ProtoNodeInput,
name: String,
pub construction_args: ConstructionArgs,
pub input: ProtoNodeInput,
pub name: String,
}
#[derive(Debug, Default, PartialEq, Eq)]