pub enum Dftd4StructureError {
EmptyAtomCount {
natoms: c_int,
},
AtomicNumberOutOfRange {
index: usize,
number: c_int,
},
MissingRequiredArray {
argument: &'static str,
},
MissingErrorHandle,
}Expand description
Input rejected by a checked constructor such as Dftd4Structure::try_new.
These conditions are validated before the FFI call because the pinned
upstream cannot report them through the error handle: a degenerate atom
count lets a later calculation abort the whole host process via a Fortran
error stop, and out-of-range atomic numbers silently produce zero-valued
results. See the crate-level documentation for details.
Variants§
EmptyAtomCount
natoms was zero or negative. The raw API accepts this silently and
only the subsequent calculation calls fail — by terminating the host
process, not via the error handle.
AtomicNumberOutOfRange
numbers[index] is outside the supported range
1..=MAX_SUPPORTED_ATOMIC_NUMBER.
Fields
MissingRequiredArray
A required array pointer (numbers or positions) was null.
MissingErrorHandle
The error handle pointer was null. Upstream v4.2.0 starts every
handle-taking API entry point by checking the handle and returns
silently when it is null: dftd4_new_structure hands back a null
structure handle, and the calculation functions leave their output
arguments untouched (a 0.0-initialised energy then looks like a
valid “no dispersion” result). Rejected before the FFI call.
Trait Implementations§
Source§impl Clone for Dftd4StructureError
impl Clone for Dftd4StructureError
Source§impl Debug for Dftd4StructureError
impl Debug for Dftd4StructureError
Source§impl Display for Dftd4StructureError
impl Display for Dftd4StructureError
impl Eq for Dftd4StructureError
Source§impl Error for Dftd4StructureError
impl Error for Dftd4StructureError
1.30.0 · 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
use the Display impl or to_string()