MCPcopy Create free account
hub / github.com/chc4/lineiform / create_ports

Method create_ports

tangle/src/node.rs:258–272  ·  view source on GitHub ↗
(&mut self, token: &mut NodeOwner, r: &mut Region)

Source from the content-addressed store, hash-verified

256 }
257
258 pub fn create_ports(&mut self, token: &mut NodeOwner, r: &mut Region) {
259 println!("create_ports called");
260 self.variant.rw(token).create_ports(r);
261 let mut inputs = vec![];
262 let mut outputs = vec![];
263 for i in 0..self.input_count(token) {
264 let p = r.add_port();
265 self.add_input(p, r);
266 inputs.push(p);
267 }
268 for i in 0..self.output_count(token) {
269 outputs.push(self.add_output(r));
270 }
271 self.variant.rw(token).ports_callback(inputs, outputs, r);
272 }
273
274 pub fn input_count(&self, token: &NodeOwner) -> usize {
275 self.variant.ro(token).input_count()

Callers 1

add_nodeMethod · 0.45

Calls 7

add_portMethod · 0.80
add_inputMethod · 0.80
pushMethod · 0.80
add_outputMethod · 0.80
input_countMethod · 0.45
output_countMethod · 0.45
ports_callbackMethod · 0.45

Tested by

no test coverage detected