protoflow_blocks/
block_connections.rs

1// This is free and unencumbered software released into the public domain.
2
3use super::{prelude::Vec, InputPortName, OutputPortName};
4
5/// A trait for defining the connections of a block instance.
6pub trait BlockConnections {
7    fn input_connections(&self) -> Vec<(&'static str, Option<InputPortName>)> {
8        if cfg!(debug_assertions) {
9            unimplemented!("BlockConnections::input_connections") // for debug builds only
10        } else {
11            Vec::new()
12        }
13    }
14
15    fn output_connections(&self) -> Vec<(&'static str, Option<OutputPortName>)> {
16        if cfg!(debug_assertions) {
17            unimplemented!("BlockConnections::output_connections") // for debug builds only
18        } else {
19            Vec::new()
20        }
21    }
22}