pub enum HsPredictError {
Show 20 variants
InvalidHsCode(String),
InvalidCasNumber(String),
MissingIdentifier,
MissingComponentIdentifier {
index: usize,
},
NoActiveQuestion,
AnswerTypeMismatch {
expected: &'static str,
got: &'static str,
},
InvalidChoiceIndex {
index: usize,
max: usize,
},
NumberOutOfRange {
value: f64,
min: f64,
max: f64,
},
SessionAlreadyComplete,
LowConfidenceNoLlm {
confidence: f32,
threshold: f32,
},
MixtureDepthExceeded,
LlmNotConfigured,
LlmApiError {
status_code: u16,
message: String,
},
LlmResponseParseError {
source: Error,
raw: String,
},
LlmRateLimitError {
retry_after_secs: u64,
},
ValidationFailed {
code: String,
},
ChapterConflict {
llm_code: String,
expected_chapter: String,
},
PubChem(PubChemError),
Serialization(Error),
Http(String),
}Expand description
All errors produced by hs-predict.
Variants§
InvalidHsCode(String)
InvalidCasNumber(String)
MissingIdentifier
MissingComponentIdentifier
NoActiveQuestion
AnswerTypeMismatch
InvalidChoiceIndex
NumberOutOfRange
SessionAlreadyComplete
LowConfidenceNoLlm
MixtureDepthExceeded
LlmNotConfigured
LlmApiError
LlmResponseParseError
LlmRateLimitError
ValidationFailed
ChapterConflict
PubChem(PubChemError)
Serialization(Error)
Http(String)
Trait Implementations§
Source§impl Debug for HsPredictError
impl Debug for HsPredictError
Source§impl Display for HsPredictError
impl Display for HsPredictError
Source§impl Error for HsPredictError
impl Error for HsPredictError
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<Error> for HsPredictError
impl From<Error> for HsPredictError
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 HsPredictError
impl !RefUnwindSafe for HsPredictError
impl Send for HsPredictError
impl Sync for HsPredictError
impl Unpin for HsPredictError
impl UnsafeUnpin for HsPredictError
impl !UnwindSafe for HsPredictError
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