pub enum MoleculeValidationError {
EmptyName,
MissingFormula,
EmptyAtomLabel,
InvalidAtomLabel(String),
EmptyAtomId,
ZeroConnectionOrder,
SelfConnection {
index: usize,
},
InvalidConnectionIndex {
index: usize,
atom_count: usize,
},
}Expand description
Errors returned when constructing molecule values.
Variants§
EmptyName
A molecule name is empty.
MissingFormula
A builder was finalized without assigning a formula.
EmptyAtomLabel
An atom label is empty.
InvalidAtomLabel(String)
An atom label does not match the supported element-symbol shape.
EmptyAtomId
An atom identifier is empty.
ZeroConnectionOrder
A connection order was zero.
SelfConnection
A connection points from an atom to itself.
InvalidConnectionIndex
A connection references an atom index outside the explicit atom list.
Trait Implementations§
Source§impl Clone for MoleculeValidationError
impl Clone for MoleculeValidationError
Source§fn clone(&self) -> MoleculeValidationError
fn clone(&self) -> MoleculeValidationError
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 MoleculeValidationError
impl Debug for MoleculeValidationError
Source§impl Display for MoleculeValidationError
impl Display for MoleculeValidationError
Source§impl Error for MoleculeValidationError
impl Error for MoleculeValidationError
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 PartialEq for MoleculeValidationError
impl PartialEq for MoleculeValidationError
Source§fn eq(&self, other: &MoleculeValidationError) -> bool
fn eq(&self, other: &MoleculeValidationError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MoleculeValidationError
impl StructuralPartialEq for MoleculeValidationError
Auto Trait Implementations§
impl Freeze for MoleculeValidationError
impl RefUnwindSafe for MoleculeValidationError
impl Send for MoleculeValidationError
impl Sync for MoleculeValidationError
impl Unpin for MoleculeValidationError
impl UnsafeUnpin for MoleculeValidationError
impl UnwindSafe for MoleculeValidationError
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