Updates the `TypingContext` with a given proto network. This will infer the types of the nodes and store them in the `inferred` field. The proto network has to be topologically sorted and contain fully resolved stable node ids.
(&mut self, network: &ProtoNetwork)
| 649 | /// and store them in the `inferred` field. The proto network has to be topologically sorted |
| 650 | /// and contain fully resolved stable node ids. |
| 651 | pub fn update(&mut self, network: &ProtoNetwork) -> Result<(), GraphErrors> { |
| 652 | for (id, node) in network.nodes.iter() { |
| 653 | self.infer(*id, node)?; |
| 654 | } |
| 655 | |
| 656 | Ok(()) |
| 657 | } |
| 658 | |
| 659 | pub fn remove_inference(&mut self, node_id: NodeId) -> Option<NodeIOTypes> { |
| 660 | self.constructor.remove(&node_id); |