Struct RelatedArticle
pub struct RelatedArticle {
pub related_article_type: Option<String>,
pub ext_link_type: Option<String>,
pub href: Option<String>,
pub id: Option<String>,
}Expand description
A link to a related article.
Maps to JATS <related-article>. The related_article_type drives common
text-mining use cases such as detecting corrections and retractions
(e.g. "corrected-article", "retracted-article", "companion",
"peer-reviewed-article").
Fields§
Relationship type. From @related-article-type.
ext_link_type: Option<String>External link type (e.g., “doi”, “pmc”). From @ext-link-type.
href: Option<String>Link target (DOI, PMC id, URL). From @xlink:href.
id: Option<String>Element id. From @id.
Implementations§
§impl RelatedArticle
impl RelatedArticle
pub fn is_correction(&self) -> bool
pub fn is_correction(&self) -> bool
Whether this link points to an article corrected by the current one
(related-article-type="corrected-article").
pub fn is_retraction(&self) -> bool
pub fn is_retraction(&self) -> bool
Whether this link points to an article retracted by the current one
(related-article-type="retracted-article").
Trait Implementations§
§impl Clone for RelatedArticle
impl Clone for RelatedArticle
§fn clone(&self) -> RelatedArticle
fn clone(&self) -> RelatedArticle
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 more§impl Debug for RelatedArticle
impl Debug for RelatedArticle
§impl<'de> Deserialize<'de> for RelatedArticle
impl<'de> Deserialize<'de> for RelatedArticle
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelatedArticle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelatedArticle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for RelatedArticle
impl PartialEq for RelatedArticle
§impl Serialize for RelatedArticle
impl Serialize for RelatedArticle
§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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for RelatedArticle
Auto Trait Implementations§
impl Freeze for RelatedArticle
impl RefUnwindSafe for RelatedArticle
impl Send for RelatedArticle
impl Sync for RelatedArticle
impl Unpin for RelatedArticle
impl UnwindSafe for RelatedArticle
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