pub enum BackgroundError {
Show 14 variants
InvalidId,
EmptyCoefficients,
NonFiniteCoefficients,
InvalidDomain,
InvalidKnots,
NonFiniteGrid {
index: usize,
},
UnorderedGrid,
GridOutsideDomain,
InvalidAmorphousPeak,
EmptyComponents,
DuplicateComponentId {
background_id: String,
},
CoefficientLengthMismatch {
expected: usize,
actual: usize,
},
SizeOverflow,
InternalInvariant,
}Expand description
Invalid analytical background definition, grid, or replacement.
Variants§
InvalidId
Model ID is empty or untrimmed.
EmptyCoefficients
Coefficient list is empty.
NonFiniteCoefficients
One coefficient is non-finite.
InvalidDomain
Chebyshev domain is non-finite or not increasing.
InvalidKnots
Point knots are invalid or do not match values.
NonFiniteGrid
Grid contains a non-finite sample.
UnorderedGrid
Grid is not strictly increasing.
GridOutsideDomain
Grid lies outside an explicit Chebyshev domain.
InvalidAmorphousPeak
Broad Gaussian area/center/FWHM is invalid.
EmptyComponents
Model composition or broad peak list is empty.
DuplicateComponentId
Composite repeats one immediate component ID.
CoefficientLengthMismatch
Replacement coefficient vector has the wrong length.
SizeOverflow
A checked matrix/vector size overflowed.
InternalInvariant
Private validated state is unexpectedly inconsistent.
Trait Implementations§
Source§impl Clone for BackgroundError
impl Clone for BackgroundError
Source§fn clone(&self) -> BackgroundError
fn clone(&self) -> BackgroundError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackgroundError
impl Debug for BackgroundError
Source§impl Display for BackgroundError
impl Display for BackgroundError
Source§impl Error for BackgroundError
impl Error for BackgroundError
1.30.0 · 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()
Source§impl From<BackgroundError> for RietveldGeneralObjectiveError
impl From<BackgroundError> for RietveldGeneralObjectiveError
Source§fn from(value: BackgroundError) -> Self
fn from(value: BackgroundError) -> Self
Converts to this type from the input type.
Source§impl From<BackgroundError> for RietveldGeneralParameterError
impl From<BackgroundError> for RietveldGeneralParameterError
Source§fn from(value: BackgroundError) -> Self
fn from(value: BackgroundError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BackgroundError
impl PartialEq for BackgroundError
impl StructuralPartialEq for BackgroundError
Auto Trait Implementations§
impl Freeze for BackgroundError
impl RefUnwindSafe for BackgroundError
impl Send for BackgroundError
impl Sync for BackgroundError
impl Unpin for BackgroundError
impl UnsafeUnpin for BackgroundError
impl UnwindSafe for BackgroundError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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> 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.