MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / update

Method update

node-graph/graph-craft/src/proto.rs:651–657  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 2

inferMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected