pub enum ParserError {
AtomCountNotInt(usize),
BondCountNotInt(usize),
FileVersionIsNotV2000(usize),
BadElementSymbol(usize, String),
BadBondNumber(usize),
BondTypeNotInt(usize),
BondTypeOutOfBounds(usize),
ThisShouldNotHappen,
NotEnoughLines,
}
Expand description
Molecule data file parsing functions return a ParserError
type when an error occurs.
Describe the specifc error type along with the line number of the molecule data file where error occured.
Variants§
AtomCountNotInt(usize)
Atom count is not an integer value, occurs while parsing the counts line.
BondCountNotInt(usize)
Bond count is not an integer value, occurs while parsing the counts line.
FileVersionIsNotV2000(usize)
The version of the molecule data file is not V2000
.
BadElementSymbol(usize, String)
Cannot parse the atom’s symbol as one of the exisiting crate::molecule::Atom
symbols,
occurs while parsing the atom line.
BadBondNumber(usize)
Cannot parse the Bond Number as an integer value, occurs while parsing the bond line.
BondTypeNotInt(usize)
Cannot parse the Bond Type as an integer value, occurs while parsing the bond line.
BondTypeOutOfBounds(usize)
Cannot parse the Bond Type as one of the exisiting crate::molecule::Bond
types, occurs
while parsing the bond line.
ThisShouldNotHappen
Unknown error which if occured, should be reported to the maintainers of the crate.
NotEnoughLines
The molecule data file does not have all the lines to reconstruct the molecule.
Trait Implementations§
Source§impl Clone for ParserError
impl Clone for ParserError
Source§fn clone(&self) -> ParserError
fn clone(&self) -> ParserError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ParserError
impl Debug for ParserError
Source§impl Display for ParserError
impl Display for ParserError
Source§impl Error for ParserError
impl Error for ParserError
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
Source§impl From<ParserError> for PyErr
impl From<ParserError> for PyErr
Source§fn from(err: ParserError) -> PyErr
fn from(err: ParserError) -> PyErr
Source§impl PartialEq for ParserError
impl PartialEq for ParserError
impl Eq for ParserError
impl StructuralPartialEq for ParserError
Auto Trait Implementations§
impl Freeze for ParserError
impl RefUnwindSafe for ParserError
impl Send for ParserError
impl Sync for ParserError
impl Unpin for ParserError
impl UnwindSafe for ParserError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more