#[non_exhaustive]pub enum KernelError {
Show 16 variants
NotFinite {
parameter: &'static str,
value: f64,
},
OutOfRange {
parameter: &'static str,
value: f64,
min: f64,
max: f64,
},
InsufficientData {
found: usize,
required: usize,
context: &'static str,
},
UnknownCardinalDirection {
direction: Excerpt,
},
BufferTooSmall {
needed: usize,
found: usize,
},
CapacityExceeded {
context: &'static str,
needed: usize,
capacity: usize,
},
SingularSystem {
context: &'static str,
},
NotCovariance {
context: &'static str,
},
NotConverged {
iterations: u32,
residual: f64,
},
Parse {
what: &'static str,
input: Excerpt,
},
Indeterminate {
quantity: &'static str,
},
Missing {
what: &'static str,
},
Unrepresentable {
what: &'static str,
},
TimeReversed {
by: Duration,
},
VerticalDatumMismatch {
required: VerticalDatum,
found: VerticalDatum,
},
OutsideValidity {
data: &'static str,
},
}Expand description
Kernel operation failure.
No operation panics on caller data; every failure is reported through this type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFinite
Parameter is NaN or infinite.
OutOfRange
Parameter is finite but out of range.
Fields
InsufficientData
Fewer items than required: interpolation nodes, route waypoints, fit samples.
Fields
UnknownCardinalDirection
Not one of the eight cardinal/intercardinal abbreviations.
BufferTooSmall
Caller-supplied output buffer too small.
Returned by slice-writing calls so a short buffer is an error, not a silent truncation.
CapacityExceeded
Inline store capacity exceeded.
Collections are fixed-capacity inline stores; their bounds are public constants, so callers can check beforehand.
Fields
SingularSystem
Linear system has no unique solution.
For a parametric fit: the sample courses do not constrain the requested coefficients (e.g. five coefficients from nodes on one semicircle).
NotCovariance
Matrix is not a valid covariance (symmetric positive definite): e.g. zero observation variance, collapsed innovation covariance.
NotConverged
Iterative solver did not converge.
The deviation inverse fails this way when deviation changes faster than 1° per degree of heading, so several compass courses map to one magnetic course; the compass needs re-swinging.
Parse
String could not be parsed.
Indeterminate
Mathematically undefined for the inputs: rhumb line through a pole, direction of a zero vector, great circle between antipodes.
Missing
Required input unavailable: snapshot without position, environment sample without tide, empty estimator history.
Unrepresentable
Result exists but is not representable: instant beyond range, counter overflow.
TimeReversed
Instants in the wrong order for the elapsed time requested (clock stepped back, or arguments swapped).
VerticalDatumMismatch
Height referred to a different vertical datum than required.
OutsideValidity
Data requested outside its validity interval (leap-second table past expiry, magnetic model past epoch).
Trait Implementations§
Source§impl Clone for KernelError
impl Clone for KernelError
Source§impl Debug for KernelError
impl Debug for KernelError
Source§impl Display for KernelError
impl Display for KernelError
Source§impl Error for KernelError
impl Error for KernelError
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()