Struct Reference
pub struct Reference {Show 18 fields
pub id: String,
pub publication_type: Option<String>,
pub title: Option<String>,
pub authors: Vec<Author>,
pub source: Option<String>,
pub year: Option<String>,
pub volume: Option<String>,
pub issue: Option<String>,
pub pages: Option<String>,
pub elocation_id: Option<String>,
pub editors: Vec<Author>,
pub publisher_name: Option<String>,
pub publisher_loc: Option<String>,
pub edition: Option<String>,
pub isbn: Option<String>,
pub conf_name: Option<String>,
pub pmid: Option<String>,
pub doi: Option<String>,
}Expand description
Reference citation.
Maps to JATS <ref> containing <element-citation> or <mixed-citation>.
Fields§
§id: StringReference ID. From <ref id="...">.
publication_type: Option<String>Publication type. From <element-citation publication-type="...">.
Common values: "journal", "book", "web", "other".
title: Option<String>Article or chapter title. From <article-title> or <chapter-title>.
Authors. From <person-group>/<name>.
source: Option<String>Source (journal name or book title). From <source>.
year: Option<String>Publication year. From <year>.
volume: Option<String>Volume. From <volume>.
issue: Option<String>Issue. From <issue>.
pages: Option<String>Page range. From <fpage>-<lpage>.
elocation_id: Option<String>Electronic location ID. From <elocation-id> (used by e-journals in
place of page numbers).
editors: Vec<Author>Editors. From <person-group person-group-type="editor"> (common for
book and book-chapter citations).
publisher_name: Option<String>Publisher name. From <publisher-name> (book / report citations).
publisher_loc: Option<String>Publisher location. From <publisher-loc>.
edition: Option<String>Edition. From <edition>.
isbn: Option<String>ISBN. From <isbn> (book citations).
conf_name: Option<String>Conference name. From <conf-name> (conference-proceedings citations).
pmid: Option<String>PubMed ID. From <pub-id pub-id-type="pmid">.
doi: Option<String>DOI. From <pub-id pub-id-type="doi">.
Implementations§
§impl Reference
impl Reference
pub fn format_citation(&self) -> String
pub fn format_citation(&self) -> String
Format a human-readable citation string.
Trait Implementations§
§impl<'de> Deserialize<'de> for Reference
impl<'de> Deserialize<'de> for Reference
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Reference, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Reference, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Serialize for Reference
impl Serialize for Reference
§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,
impl StructuralPartialEq for Reference
Auto Trait Implementations§
impl Freeze for Reference
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnwindSafe for Reference
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