pub enum ReturnCode {
Success,
MaxIters,
Unstable,
Terminated,
Failure,
}Expand description
Why a solve stopped — the SciML ReturnCode vocabulary
(esm-libraries-spec.md §2.5.3).
This REPLACES reading SolutionMetadata’s step and evaluation counters as
a proxy for whether a run finished. The counters remain, as informative
statistics; the answer to “did it reach tspan.1” is this enum and nothing
else, and a caller never has to parse an error message to get it.
Variants§
Success
The integration reached the end of tspan.
MaxIters
The integrator hit the configured SolveOptions::maxiters cap first.
The trajectory returned is everything computed up to that point.
Unstable
The state left the finite range (a NaN or an infinity appeared), so the remaining trajectory would be meaningless.
Terminated
A callback or the progress observer asked the integrator to stop
(Flow::Cancel). Nothing went wrong: it is the caller’s own decision.
Failure
The solver itself reported an error — a step failure, a build failure, a nonlinear-solve failure.
Implementations§
Source§impl ReturnCode
impl ReturnCode
Sourcepub fn is_success(self) -> bool
pub fn is_success(self) -> bool
Whether this is ReturnCode::Success — the one code that means the
integration covered the whole of tspan.
Trait Implementations§
Source§impl Clone for ReturnCode
impl Clone for ReturnCode
impl Copy for ReturnCode
Source§impl Debug for ReturnCode
impl Debug for ReturnCode
Source§impl Display for ReturnCode
impl Display for ReturnCode
impl Eq for ReturnCode
Source§impl PartialEq for ReturnCode
impl PartialEq for ReturnCode
impl StructuralPartialEq for ReturnCode
Auto Trait Implementations§
impl Freeze for ReturnCode
impl RefUnwindSafe for ReturnCode
impl Send for ReturnCode
impl Sync for ReturnCode
impl Unpin for ReturnCode
impl UnsafeUnpin for ReturnCode
impl UnwindSafe for ReturnCode
Blanket Implementations§
impl<T> Boilerplate for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T, U> Imply<T> for U
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar 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.