pub enum SmilesError {
UnexpectedEnd {
pos: usize,
},
UnknownElement {
symbol: String,
pos: usize,
},
UnmatchedRingClosure {
ring_num: u8,
pos: usize,
},
MismatchedParentheses {
pos: usize,
},
InvalidBracketAtom {
detail: String,
pos: usize,
},
ConflictingRingBond {
ring_num: u8,
pos: usize,
},
EmptyInput,
}Expand description
Errors produced during SMILES parsing.
Variants§
UnexpectedEnd
Input string ended unexpectedly.
UnknownElement
Unrecognised element symbol inside a bracket atom.
UnmatchedRingClosure
A ring-closure digit was opened but never closed (or vice-versa).
MismatchedParentheses
Mismatched parentheses.
InvalidBracketAtom
A bracket atom [...] could not be parsed.
ConflictingRingBond
Conflicting bond types at both ends of a ring closure.
EmptyInput
Empty SMILES string.
Trait Implementations§
Source§impl Clone for SmilesError
impl Clone for SmilesError
Source§fn clone(&self) -> SmilesError
fn clone(&self) -> SmilesError
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 SmilesError
impl Debug for SmilesError
Source§impl Display for SmilesError
impl Display for SmilesError
Source§impl Error for SmilesError
impl Error for SmilesError
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 SmilesError
impl PartialEq for SmilesError
Source§fn eq(&self, other: &SmilesError) -> bool
fn eq(&self, other: &SmilesError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SmilesError
impl StructuralPartialEq for SmilesError
Auto Trait Implementations§
impl Freeze for SmilesError
impl RefUnwindSafe for SmilesError
impl Send for SmilesError
impl Sync for SmilesError
impl Unpin for SmilesError
impl UnsafeUnpin for SmilesError
impl UnwindSafe for SmilesError
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