MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / submit

Method submit

flow-rs/src/loader/python/mod.rs:55–81  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

53
54impl 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, &params))
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
84struct ResourcePlugin {

Callers 1

loadFunction · 0.80

Calls 5

port_nameFunction · 0.85
toml2dictFunction · 0.85
insertMethod · 0.80
cloneMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected