pub enum MeshError {
InvalidConfig(String),
InvalidRouterConfig {
field: &'static str,
reason: String,
},
NeuronCountMismatch {
expected: usize,
got: usize,
context: String,
},
IndexOutOfBounds {
index: usize,
max: usize,
},
TopologyError(String),
DelayError(String),
NonFiniteSignal {
index: usize,
context: String,
},
NonFiniteNeuromodulator {
field: &'static str,
},
OutOfRangeNeuromodulator {
field: &'static str,
value: f32,
},
}Expand description
Unified error type for synaptic-wiring operations.
Variants§
InvalidConfig(String)
A required parameter was out of range or invalid.
InvalidRouterConfig
crate::RouterConfig or a crate::ChannelRouter checkpoint failed
validation.
field is the config or state field that failed ("leak",
"neurons", "baseline_weights", …) so constructor and serde paths
can be compared by category without parsing the reason string.
Fields
NeuronCountMismatch
Neuron count mismatch between components.
IndexOutOfBounds
Attempted to access a neuron or synapse that doesn’t exist.
TopologyError(String)
Topology generation failed (e.g., impossible wiring constraints).
DelayError(String)
Delay buffer overflow or misconfiguration.
NonFiniteSignal
A ChannelRouter channel signal was
NaN or ±infinity. index is the channel of the rejected sample;
context names the public entry point ("route signals" or
"route_modulated signals").
NonFiniteNeuromodulator
A NeuromodState field was NaN or
±infinity. field is "cortisol", "dopamine", or "serotonin".
OutOfRangeNeuromodulator
A NeuromodState field was finite but
outside the documented [0, 1] interval. Out-of-range values are
rejected rather than silently clamped.
Trait Implementations§
Source§impl Error for MeshError
impl Error for MeshError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()