#[non_exhaustive]pub enum AlgoError {
EmptyInput(&'static str),
InvalidGeometry(&'static str),
InvalidArgument(String),
Io(Error),
Parse(String),
NotFound(String),
}Expand description
Errors raised by petekTools.
The numeric-kernel surface is narrow (bad inputs, degenerate geometry) and
&'static str-payloaded. The container module adds a small I/O-shaped
surface (I/O failures, corrupt/parse errors, missing sections) since it
round-trips section blobs to disk. The stats / sampling front-doors add
InvalidArgument for bad parameters / ranges.
The enum is #[non_exhaustive]: match with a wildcard arm so a future
variant is never a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyInput(&'static str)
A kernel was handed no data to work with.
InvalidGeometry(&'static str)
The target lattice is degenerate (e.g. zero node spacing).
InvalidArgument(String)
A parameter or range argument was invalid — e.g. a percentile outside
[0, 100], a non-positive standard deviation, or a values/weights
length mismatch. Raised by the stats / sampling front-doors.
Io(Error)
Underlying I/O failure (file open/read/write) — raised by container.
Parse(String)
A byte stream could not be parsed / was corrupt — raised by container.
NotFound(String)
A named item (e.g. a container section) was not found.
Trait Implementations§
Source§impl Error for AlgoError
impl Error for AlgoError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for AlgoError
impl !UnwindSafe for AlgoError
impl Freeze for AlgoError
impl Send for AlgoError
impl Sync for AlgoError
impl Unpin for AlgoError
impl UnsafeUnpin for AlgoError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.