pub struct ValenceError {
pub atom: AtomIdx,
pub actual: u8,
pub allowed: &'static [u8],
}Expand description
A valence violation on a specific atom.
Returned by validate_valence for each atom whose observed bond-order sum
exceeds all allowed normal valences (after formal-charge adjustment).
Fields§
§atom: AtomIdxIndex of the over-valenced atom.
actual: u8Observed bond-order sum (+ explicit bracket H count).
allowed: &'static [u8]Allowed normal valences for the element (from crate::Element::normal_valences).
Trait Implementations§
Source§impl Clone for ValenceError
impl Clone for ValenceError
Source§fn clone(&self) -> ValenceError
fn clone(&self) -> ValenceError
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 ValenceError
impl Debug for ValenceError
Source§impl Display for ValenceError
impl Display for ValenceError
Source§impl Error for ValenceError
impl Error for ValenceError
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()
Auto Trait Implementations§
impl Freeze for ValenceError
impl RefUnwindSafe for ValenceError
impl Send for ValenceError
impl Sync for ValenceError
impl Unpin for ValenceError
impl UnsafeUnpin for ValenceError
impl UnwindSafe for ValenceError
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