PubMedArticle

Struct PubMedArticle 

pub struct PubMedArticle {
Show 20 fields pub pmid: String, pub title: String, pub authors: Vec<Author>, pub author_count: u32, pub journal: String, pub pub_date: String, pub doi: Option<String>, pub pmc_id: Option<String>, pub abstract_text: Option<String>, pub structured_abstract: Option<Vec<AbstractSection>>, pub article_types: Vec<String>, pub mesh_headings: Option<Vec<MeshHeading>>, pub keywords: Option<Vec<String>>, pub chemical_list: Option<Vec<ChemicalConcept>>, pub volume: Option<String>, pub issue: Option<String>, pub pages: Option<String>, pub language: Option<String>, pub journal_abbreviation: Option<String>, pub issn: Option<String>,
}
Expand description

Represents a PubMed article with metadata

Fields§

§pmid: String

PubMed ID

§title: String

Article title

§authors: Vec<Author>

List of authors with detailed metadata

§author_count: u32

Number of authors (computed from authors list)

§journal: String

Journal name

§pub_date: String

Publication date

§doi: Option<String>

DOI (Digital Object Identifier)

§pmc_id: Option<String>

PMC ID if available (with PMC prefix, e.g., “PMC7092803”)

§abstract_text: Option<String>

Abstract text (if available)

§structured_abstract: Option<Vec<AbstractSection>>

Structured abstract sections with labels (if available)

Some PubMed articles have structured abstracts with labeled sections like “BACKGROUND”, “METHODS”, “RESULTS”, “CONCLUSIONS”. When available, this field contains each section separately. The abstract_text field still contains the full concatenated text.

§article_types: Vec<String>

Article types (e.g., “Clinical Trial”, “Review”, etc.)

§mesh_headings: Option<Vec<MeshHeading>>

MeSH headings associated with the article

§keywords: Option<Vec<String>>

Author-provided keywords

§chemical_list: Option<Vec<ChemicalConcept>>

Chemical substances mentioned in the article

§volume: Option<String>

Journal volume (e.g., “88”)

§issue: Option<String>

Journal issue number (e.g., “3”)

§pages: Option<String>

Page range (e.g., “123-130”)

§language: Option<String>

Article language (e.g., “eng”, “jpn”)

§journal_abbreviation: Option<String>

ISO journal abbreviation (e.g., “J Biol Chem”)

§issn: Option<String>

ISSN (International Standard Serial Number)

Implementations§

§

impl PubMedArticle

pub fn get_major_mesh_terms(&self) -> Vec<String>

Get all major MeSH terms from the article

§Returns

A vector of major MeSH term names

§Example
let major_terms = article.get_major_mesh_terms();

pub fn has_mesh_term(&self, term: &str) -> bool

Check if the article has a specific MeSH term

§Arguments
  • term - The MeSH term to check for
§Returns

true if the article has the specified MeSH term, false otherwise

§Example
let has_diabetes = article.has_mesh_term("Diabetes Mellitus");

pub fn get_all_mesh_terms(&self) -> Vec<String>

Get all MeSH terms from the article

§Returns

A vector of all MeSH term names

pub fn get_corresponding_authors(&self) -> Vec<&Author>

Get corresponding authors from the article

§Returns

A vector of references to authors marked as corresponding

pub fn get_authors_by_institution(&self, institution: &str) -> Vec<&Author>

Get authors affiliated with a specific institution

§Arguments
  • institution - Institution name to search for (case-insensitive substring match)
§Returns

A vector of references to authors with matching affiliations

pub fn get_author_countries(&self) -> Vec<String>

Get all unique countries from author affiliations

§Returns

A vector of unique country names

pub fn get_authors_with_orcid(&self) -> Vec<&Author>

Get authors with ORCID identifiers

§Returns

A vector of references to authors who have ORCID IDs

pub fn has_international_collaboration(&self) -> bool

Check if the article has international collaboration

§Returns

true if authors are from multiple countries

pub fn mesh_term_similarity(&self, other: &PubMedArticle) -> f64

Calculate MeSH term similarity between two articles

§Arguments
  • other - The other article to compare with
§Returns

A similarity score between 0.0 and 1.0 based on Jaccard similarity

§Example
let similarity = article1.mesh_term_similarity(&article2);

pub fn get_mesh_qualifiers(&self, term: &str) -> Vec<String>

Get MeSH qualifiers for a specific term

§Arguments
  • term - The MeSH term to get qualifiers for
§Returns

A vector of qualifier names for the specified term

pub fn has_mesh_terms(&self) -> bool

Check if the article has any MeSH terms

§Returns

true if the article has MeSH terms, false otherwise

pub fn get_chemical_names(&self) -> Vec<String>

Get chemicals mentioned in the article

§Returns

A vector of chemical names

Trait Implementations§

§

impl Clone for PubMedArticle

§

fn clone(&self) -> PubMedArticle

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for PubMedArticle

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for PubMedArticle

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<PubMedArticle, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl ExportFormat for PubMedArticle

Source§

fn to_bibtex(&self) -> String

Export the article metadata as a BibTeX entry
Source§

fn to_ris(&self) -> String

Export the article metadata in RIS format
Source§

fn to_csl_json(&self) -> Value

Export the article metadata as CSL-JSON
Source§

fn to_nbib(&self) -> String

Export the article metadata in MEDLINE/NBIB format
§

impl Serialize for PubMedArticle

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,