| 53 | |
| 54 | impl Plugin for NodePlugin { |
| 55 | fn submit(&self) { |
| 56 | let params = self.params.clone(); |
| 57 | crate::node::NodeSlice::registry_local() |
| 58 | .get(self.local_key) |
| 59 | .insert( |
| 60 | self.params.name.clone(), |
| 61 | crate::node::NodeSlice { |
| 62 | cons: Box::new(move |name: String, args: &toml::value::Table| { |
| 63 | Box::new(node::PyNode::new(name, args, ¶ms)) |
| 64 | }), |
| 65 | info: flow_rs::node::NodeInfo { |
| 66 | inputs: self |
| 67 | .params |
| 68 | .inputs |
| 69 | .iter() |
| 70 | .map(|x| port::port_name(x)) |
| 71 | .collect(), |
| 72 | outputs: self |
| 73 | .params |
| 74 | .outputs |
| 75 | .iter() |
| 76 | .map(|x| port::port_name(x)) |
| 77 | .collect(), |
| 78 | }, |
| 79 | }, |
| 80 | ); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | struct ResourcePlugin { |