Struct SearchResult
pub struct SearchResult {
pub pmids: Vec<String>,
pub total_count: usize,
pub webenv: Option<String>,
pub query_key: Option<String>,
pub query_translation: Option<String>,
}Expand description
Search result with WebEnv session information for history server pagination
Fields§
§pmids: Vec<String>List of PMIDs matching the search query
total_count: usizeTotal number of results matching the query
webenv: Option<String>WebEnv session identifier for history server
query_key: Option<String>Query key for history server
query_translation: Option<String>How PubMed interpreted and translated the search query
For example, searching “asthma” might be translated to:
"asthma"[MeSH Terms] OR "asthma"[All Fields]
This is useful for debugging search queries and understanding how PubMed’s automatic term mapping works.
Implementations§
§impl SearchResult
impl SearchResult
pub fn history_session(&self) -> Option<HistorySession>
pub fn history_session(&self) -> Option<HistorySession>
Get the history session if WebEnv and query_key are available
Returns Some(HistorySession) if both webenv and query_key are present,
None otherwise.
pub fn has_history(&self) -> bool
pub fn has_history(&self) -> bool
Check if this result has history session information
Trait Implementations§
§impl Clone for SearchResult
impl Clone for SearchResult
§fn clone(&self) -> SearchResult
fn clone(&self) -> SearchResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SearchResult
impl RefUnwindSafe for SearchResult
impl Send for SearchResult
impl Sync for SearchResult
impl Unpin for SearchResult
impl UnwindSafe for SearchResult
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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