pub enum PubChemError {
NotFound {
input: String,
},
NoUsableIdentifier,
Http(String),
Parse(String),
RateLimitExceeded,
}Expand description
Errors produced by the PubChem API client.
Variants§
NotFound
PubChem returned no compound matching the given input.
NoUsableIdentifier
The SubstanceIdentifier has no field usable for a PubChem lookup.
At least one of: CAS number, SMILES, InChIKey, InChI, or IUPAC name must be present.
Http(String)
HTTP-level error (network failure, server error, etc.).
Parse(String)
The API response could not be parsed.
RateLimitExceeded
PubChem server returned a rate-limit response (HTTP 429).
Trait Implementations§
Source§impl Debug for PubChemError
impl Debug for PubChemError
Source§impl Display for PubChemError
impl Display for PubChemError
Source§impl Error for PubChemError
impl Error for PubChemError
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 From<PubChemError> for HsPredictError
impl From<PubChemError> for HsPredictError
Source§fn from(source: PubChemError) -> Self
fn from(source: PubChemError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PubChemError
impl RefUnwindSafe for PubChemError
impl Send for PubChemError
impl Sync for PubChemError
impl Unpin for PubChemError
impl UnsafeUnpin for PubChemError
impl UnwindSafe for PubChemError
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