// This is free and unencumbered software released into the public domain. #[test] fn define_function_block() { use protoflow_core::{BlockResult, FunctionBlock, InputPort, OutputPort}; use protoflow_derive::FunctionBlock; /// A block that simply echoes inputs to outputs. #[derive(FunctionBlock, Clone)] pub struct Echo(pub InputPort, pub OutputPort); impl FunctionBlock for Echo { fn compute(&self, input: i64) -> BlockResult { Ok(input) } } }