pub enum ApexSolverError {
Core(CoreError),
Optimizer(OptimizerError),
LinearAlgebra(LinAlgError),
Manifold(ManifoldError),
Io(IoError),
Observer(ObserverError),
}Expand description
Main error type for the apex-solver library
This is the top-level error type exposed by public APIs. It wraps module-specific errors while preserving the full error chain for debugging.
§Error Chain Access
You can access the full error chain using the chain() method:
if let Err(e) = solver_optimize() {
warn!("Error: {}", e);
warn!("Full chain: {}", e.chain());
}Variants§
Core(CoreError)
Core module errors (problem construction, factors, variables)
Optimizer(OptimizerError)
Optimization algorithm errors
LinearAlgebra(LinAlgError)
Linear algebra errors
Manifold(ManifoldError)
Manifold operation errors
Io(IoError)
I/O and file parsing errors
Observer(ObserverError)
Observer/visualization errors
Implementations§
Source§impl ApexSolverError
impl ApexSolverError
Sourcepub fn chain(&self) -> String
pub fn chain(&self) -> String
Get the full error chain as a string for logging and debugging.
This method traverses the error source chain and returns a formatted string showing the hierarchy of errors from the top-level ApexSolverError down to the root cause.
§Example
match solver_optimize() {
Ok(result) => { /* ... */ }
Err(e) => {
warn!("Optimization failed!");
warn!("Error chain: {}", e.chain());
// Output: "Optimizer error: Linear system solve failed →
// Linear algebra error: Singular matrix detected"
}
}Sourcepub fn chain_compact(&self) -> String
pub fn chain_compact(&self) -> String
Get a compact single-line error chain for logging
Similar to chain() but formats as a single line with arrow separators.
§Example
error!("Operation failed: {}", apex_err.chain_compact());
// Output: "Optimizer error → Linear algebra error → Singular matrix"Trait Implementations§
Source§impl Debug for ApexSolverError
impl Debug for ApexSolverError
Source§impl Display for ApexSolverError
impl Display for ApexSolverError
Source§impl Error for ApexSolverError
impl Error for ApexSolverError
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
Source§impl From<CoreError> for ApexSolverError
impl From<CoreError> for ApexSolverError
Source§impl From<IoError> for ApexSolverError
impl From<IoError> for ApexSolverError
Source§impl From<LinAlgError> for ApexSolverError
impl From<LinAlgError> for ApexSolverError
Source§fn from(source: LinAlgError) -> Self
fn from(source: LinAlgError) -> Self
Source§impl From<ManifoldError> for ApexSolverError
impl From<ManifoldError> for ApexSolverError
Source§fn from(source: ManifoldError) -> Self
fn from(source: ManifoldError) -> Self
Source§impl From<ObserverError> for ApexSolverError
impl From<ObserverError> for ApexSolverError
Source§fn from(source: ObserverError) -> Self
fn from(source: ObserverError) -> Self
Source§impl From<OptimizerError> for ApexSolverError
impl From<OptimizerError> for ApexSolverError
Source§fn from(source: OptimizerError) -> Self
fn from(source: OptimizerError) -> Self
Auto Trait Implementations§
impl Freeze for ApexSolverError
impl !RefUnwindSafe for ApexSolverError
impl Send for ApexSolverError
impl Sync for ApexSolverError
impl Unpin for ApexSolverError
impl !UnwindSafe for ApexSolverError
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
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.