pub enum ModelError {
Operator(OperatorError),
FieldLength {
expected: usize,
actual: usize,
},
ShellLength {
shell: &'static str,
expected: usize,
actual: usize,
},
UnsupportedBasis {
model: &'static str,
basis: SimulationBasis,
},
UnexpectedChannel {
model: &'static str,
channel: InteractionChannel,
},
NonFiniteParameter {
name: &'static str,
value: f64,
},
InvalidInput(String),
}Expand description
Errors raised while constructing a physical model.
Variants§
Operator(OperatorError)
An operator constructor rejected a term.
FieldLength
A site-dependent parameter has the wrong length.
Fields
ShellLength
A J1 or J2 shell received the wrong number of resolved coefficients.
Fields
UnsupportedBasis
A model was requested in a basis not supported by its conversion.
UnexpectedChannel
An interaction table contains a channel for another model family.
NonFiniteParameter
A physical scalar parameter is not finite.
InvalidInput(String)
Geometry or interaction validation failed while building a model.
Trait Implementations§
Source§impl Clone for ModelError
impl Clone for ModelError
Source§fn clone(&self) -> ModelError
fn clone(&self) -> ModelError
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 ModelError
impl Debug for ModelError
Source§impl Display for ModelError
impl Display for ModelError
Source§impl Error for ModelError
impl Error for ModelError
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<OperatorError> for ModelError
impl From<OperatorError> for ModelError
Source§fn from(error: OperatorError) -> ModelError
fn from(error: OperatorError) -> ModelError
Converts to this type from the input type.
Source§impl PartialEq for ModelError
impl PartialEq for ModelError
impl StructuralPartialEq for ModelError
Auto Trait Implementations§
impl Freeze for ModelError
impl RefUnwindSafe for ModelError
impl Send for ModelError
impl Sync for ModelError
impl Unpin for ModelError
impl UnsafeUnpin for ModelError
impl UnwindSafe for ModelError
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