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

Interface NodeBehavior

tangle/src/node.rs:171–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169pub use NodeVariant::*;
170
171pub trait NodeBehavior: core::fmt::Debug + core::any::Any {
172 fn set_time(&mut self, time: Timestamp) {
173 unimplemented!();
174 }
175 fn get_time(&self) -> Timestamp {
176 unimplemented!();
177 }
178
179 fn create_ports(&self, r: &mut Region) {
180 }
181
182 fn ports_callback(&mut self, inputs: Vec<PortIdx>, outputs: Vec<PortIdx>, r: &mut Region) {
183 }
184
185 fn codegen(&self, token: &NodeOwner, inputs: Vec<PortIdx>, outputs: Vec<PortIdx>, r: &mut Region, ir: &mut IR, ops: &mut Assembler) {
186 unimplemented!();
187 }
188
189
190 fn tag(&self) -> String;
191
192 fn input_count(&self) -> usize {
193 unimplemented!();
194 }
195 fn output_count(&self) -> usize {
196 unimplemented!();
197 }
198}
199
200impl Node {
201 pub fn as_variant<'a, T>(&'a self, token: &'a NodeOwner) -> Option<&'a T> where T: 'static {

Callers

nothing calls this directly

Implementers 1

node.rstangle/src/node.rs

Calls

no outgoing calls

Tested by

no test coverage detected