pub trait NeuronErased:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> String;
fn name_without_codec(&self) -> String;
fn schema(&self) -> String;
fn payload_type_id(&self) -> TypeId;
fn codec_type_id(&self) -> TypeId;
fn clone_to_box(&self) -> Box<dyn NeuronErased + Send + Sync + 'static>;
fn clone_to_arc(&self) -> Arc<dyn NeuronErased + Send + Sync + 'static>;
fn encode_any(&self, data: &dyn Any) -> Result<Vec<u8>, NeuronError>;
fn decode_any(&self, data: &[u8]) -> Result<Box<dyn Any>, NeuronError>;
fn as_any(&self) -> &dyn Any;
}Expand description
Type-erased neuron that can be stored in collections with other type-erased neurons