pub enum PubMedError {
Show 14 variants
RequestError(Error),
JsonError(Error),
XmlError(String),
ArticleNotFound {
pmid: String,
},
PmcNotAvailable {
id: String,
},
InvalidPmid {
pmid: String,
},
InvalidPmcid {
pmcid: String,
},
InvalidQuery(String),
RateLimitExceeded,
ApiError {
status: u16,
message: String,
},
IoError {
message: String,
},
SearchLimitExceeded {
requested: usize,
maximum: usize,
},
HistorySessionError(String),
WebEnvNotAvailable,
}Expand description
Error types for PubMed client operations
Variants§
RequestError(Error)
HTTP request failed
JsonError(Error)
JSON parsing failed
XmlError(String)
XML parsing failed
ArticleNotFound
Article not found
PmcNotAvailable
PMC full text not available
InvalidPmid
Invalid PMID format
InvalidPmcid
Invalid PMC ID format
InvalidQuery(String)
Invalid query structure or parameters
RateLimitExceeded
API rate limit exceeded
ApiError
Generic API error with HTTP status code
IoError
IO error for file operations
SearchLimitExceeded
Search limit exceeded This error is returned when a search query requests more results than the maximum retrievable limit.
HistorySessionError(String)
History session expired or invalid This error is returned when the WebEnv session is no longer valid (typically after 1 hour).
WebEnvNotAvailable
WebEnv not available in search result This error is returned when attempting to use history server features but the search did not return WebEnv/query_key (e.g., usehistory=y was not specified).
Trait Implementations§
Source§impl Debug for PubMedError
impl Debug for PubMedError
Source§impl Display for PubMedError
impl Display for PubMedError
Source§impl Error for PubMedError
impl Error for PubMedError
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 PubMedError
impl From<Error> for PubMedError
Source§impl From<Error> for PubMedError
impl From<Error> for PubMedError
Source§impl RetryableError for PubMedError
impl RetryableError for PubMedError
Source§fn is_retryable(&self) -> bool
fn is_retryable(&self) -> bool
Returns true if the error is transient and the operation should be retried
Source§fn retry_reason(&self) -> &str
fn retry_reason(&self) -> &str
Returns a human-readable description of why the error is/isn’t retryable
Auto Trait Implementations§
impl Freeze for PubMedError
impl !RefUnwindSafe for PubMedError
impl Send for PubMedError
impl Sync for PubMedError
impl Unpin for PubMedError
impl UnsafeUnpin for PubMedError
impl !UnwindSafe for PubMedError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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