pub struct TrellisError<O, E> {
pub cause: ErrorCause<E>,
pub result: Option<O>,
}Expand description
An error wrapper for trellis calculations
The error wraps the underlying error type ErrorCause, which contains information about the
reason the calculation failed. In addition it can optionally return the an output from the
calculation. This is useful in situations where a failure occured due to running out of
iterations, or termination from the parent thread, but the state of the calculation at that
point may still contain meaningful information. Maybe the calculation ran out of iterations
because it was unable to reach the required tolerance, but is still at convergence?
Fields§
§cause: ErrorCause<E>The underlying error cause.
result: Option<O>An optional result which can be extracted by the caller
Trait Implementations§
Source§impl<O, E: Debug> Display for TrellisError<O, E>
impl<O, E: Debug> Display for TrellisError<O, E>
Source§impl<O, E> Error for TrellisError<O, E>
impl<O, E> Error for TrellisError<O, E>
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()
Auto Trait Implementations§
impl<O, E> Freeze for TrellisError<O, E>
impl<O, E> RefUnwindSafe for TrellisError<O, E>where
E: RefUnwindSafe,
O: RefUnwindSafe,
impl<O, E> Send for TrellisError<O, E>
impl<O, E> Sync for TrellisError<O, E>
impl<O, E> Unpin for TrellisError<O, E>
impl<O, E> UnwindSafe for TrellisError<O, E>where
E: UnwindSafe,
O: UnwindSafe,
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