use action::Action; use std::vec; trait Block { fn get_connections(&self) -> &Vec; fn get_value(&self) -> &f64; fn get_name(&self) -> &'static str; fn compute(&self) -> Vec; fn clean(&self); } struct NeuronBlock { connections: Vec, current_value: f64, new_value: f64, } impl Block for NeuronBlock { fn get_connections(&self) -> &Vec { &self.connections } fn get_value(&self) -> &f64 { &self.current_value } fn get_name(&self) -> &'static str { "Neuron" } fn compute(&self) -> Vec { Vec::new() } fn clean(&self) { } }