Struct OaSubsetInfo
pub struct OaSubsetInfo {
pub pmcid: String,
pub is_oa_subset: bool,
pub citation: Option<String>,
pub license: Option<String>,
pub retracted: bool,
pub download_link: Option<String>,
pub download_format: Option<String>,
pub updated: Option<String>,
pub error_code: Option<String>,
pub error_message: Option<String>,
}Expand description
Information about OA (Open Access) subset availability for a PMC article
The OA subset contains articles with programmatic access to full-text XML. Not all PMC articles are in the OA subset - some publishers restrict programmatic access even though the article may be viewable on the PMC website.
Fields§
§pmcid: StringPMC ID (e.g., “PMC7906746”)
is_oa_subset: boolWhether the article is in the OA subset
citation: Option<String>Citation string (if available)
license: Option<String>License type (if available)
retracted: boolWhether the article is retracted
download_link: Option<String>Download link for tar.gz package (if available)
download_format: Option<String>Format of the download (e.g., “tgz”, “pdf”)
updated: Option<String>Last updated timestamp for the download
error_code: Option<String>Error code if not in OA subset
error_message: Option<String>Error message if not in OA subset
Implementations§
§impl OaSubsetInfo
impl OaSubsetInfo
pub fn available(pmcid: String) -> OaSubsetInfo
pub fn available(pmcid: String) -> OaSubsetInfo
Create a new OaSubsetInfo for an article in the OA subset
pub fn not_available(
pmcid: String,
error_code: String,
error_message: String,
) -> OaSubsetInfo
pub fn not_available( pmcid: String, error_code: String, error_message: String, ) -> OaSubsetInfo
Create a new OaSubsetInfo for an article NOT in the OA subset
Trait Implementations§
§impl Clone for OaSubsetInfo
impl Clone for OaSubsetInfo
§fn clone(&self) -> OaSubsetInfo
fn clone(&self) -> OaSubsetInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for OaSubsetInfo
impl Debug for OaSubsetInfo
§impl<'de> Deserialize<'de> for OaSubsetInfo
impl<'de> Deserialize<'de> for OaSubsetInfo
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OaSubsetInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OaSubsetInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for OaSubsetInfo
impl Serialize for OaSubsetInfo
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for OaSubsetInfo
impl RefUnwindSafe for OaSubsetInfo
impl Send for OaSubsetInfo
impl Sync for OaSubsetInfo
impl Unpin for OaSubsetInfo
impl UnwindSafe for OaSubsetInfo
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
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>
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>
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