#[non_exhaustive]pub enum EncoderError {
NonFiniteRate {
parameter: &'static str,
},
RateOrder,
InvalidRange {
parameter: &'static str,
},
CountMustBePositive {
parameter: &'static str,
},
NonPositiveOrNonFinite {
parameter: &'static str,
},
NonNegativeFinite {
parameter: &'static str,
},
NumChannelsTooLarge,
HistoryDepthTooSmall {
minimum: usize,
},
StateLengthMismatch {
left: &'static str,
right: &'static str,
},
HistoryLengthExceedsDepth {
channel: usize,
},
WindowMustBePositive {
parameter: &'static str,
},
}Expand description
Stable error type returned by fallible encoder constructors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NonFiniteRate
A rate parameter must be finite.
RateOrder
base_rate must not exceed max_rate.
InvalidRange
Numeric range bounds must be finite and strictly increasing.
CountMustBePositive
Count parameters must be positive.
NonPositiveOrNonFinite
A threshold/tuning-width style parameter must be finite and positive.
NonNegativeFinite
A parameter must be finite and non-negative (>= 0).
NumChannelsTooLarge
Channel/neuron count exceeds the u16 channel-ID range used when emitting spikes.
HistoryDepthTooSmall
Temporal history depth is too small for the encoder window.
StateLengthMismatch
A deserialized state vector has inconsistent lengths.
HistoryLengthExceedsDepth
A deserialized history channel contains more samples than allowed by history_depth.
WindowMustBePositive
Cycle/window parameters must be non-zero.
Trait Implementations§
Source§impl Clone for EncoderError
impl Clone for EncoderError
Source§fn clone(&self) -> EncoderError
fn clone(&self) -> EncoderError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncoderError
impl Debug for EncoderError
Source§impl Display for EncoderError
impl Display for EncoderError
Source§impl Error for EncoderError
impl Error for EncoderError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<PredictiveEncoderError> for EncoderError
impl From<PredictiveEncoderError> for EncoderError
Source§fn from(error: PredictiveEncoderError) -> Self
fn from(error: PredictiveEncoderError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EncoderError
impl PartialEq for EncoderError
impl StructuralPartialEq for EncoderError
Auto Trait Implementations§
impl Freeze for EncoderError
impl RefUnwindSafe for EncoderError
impl Send for EncoderError
impl Sync for EncoderError
impl Unpin for EncoderError
impl UnsafeUnpin for EncoderError
impl UnwindSafe for EncoderError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more