pub struct Citation {
pub key: &'static str,
pub authors: &'static [(&'static str, &'static str)],
pub year: u16,
pub title: &'static str,
pub venue: &'static str,
pub volume: Option<&'static str>,
pub issue: Option<&'static str>,
pub pages: Option<&'static str>,
pub doi: Option<&'static str>,
pub url: Option<&'static str>,
pub kind: Kind,
pub tier: Tier,
}Expand description
One bibliographic reference.
Fields§
§key: &'static strStable citation key (familyYYYY, lower-case ASCII).
Authors in publication order as (family, given). A group author has an empty given.
year: u16Year of the issue (for the DiMA paper: 2025, although it was published online in 2024).
title: &'static strTitle, sentence case as published.
venue: &'static strJournal, proceedings, book or issuing body.
volume: Option<&'static str>Volume, if any.
issue: Option<&'static str>Issue, if any.
pages: Option<&'static str>Page range (first-last) or article number.
doi: Option<&'static str>DOI without the resolver prefix.
url: Option<&'static str>Canonical URL, for references without a DOI.
kind: KindPublication type.
tier: TierCitation-policy tier.
Implementations§
Source§impl Citation
impl Citation
Sourcepub fn designation(&self) -> Option<&'static str>
pub fn designation(&self) -> Option<&'static str>
The short name its publisher gives this standard, used as its label: RFC 8259,
UAX #15, WCAG 2.2; None for every other reference.
Sourcepub fn short(&self) -> String
pub fn short(&self) -> String
The in-text label, the same on every surface: Tharanga et al. 2025,
Grüning, Dale et al. 2018, RFC 8259 (see the module documentation for the rule).
Sourcepub fn listed_year(&self) -> String
pub fn listed_year(&self) -> String
The year as dima’s own name-year lists show it: 2018, or 2024a when a year letter
tells apart works with identical authors and year.
Sourcepub fn href(&self) -> Option<String>
pub fn href(&self) -> Option<String>
Resolvable URL: https://doi.org/… for a DOI, else the stored URL.
Sourcepub fn text(&self) -> String
pub fn text(&self) -> String
Full plain-text reference (Vancouver/NLM style), as exported (run.references,
dima cite), e.g.
Tharanga S, Ünlü ES, … Khan AM. DiMA: sequence diversity dynamics analyser for viruses. Briefings in Bioinformatics. 2025;26(1):bbae607. doi:10.1093/bib/bbae607.
Sourcepub fn listed_text(&self) -> String
pub fn listed_text(&self) -> String
Citation::text as dima’s own reference lists show it (the documentation and its
Bibliography): led by the designation of a standard that has one, and with a year letter
where the label has one (Citation::listed_year).
Trait Implementations§
impl Eq for Citation
impl StructuralPartialEq for Citation
Auto Trait Implementations§
impl Freeze for Citation
impl RefUnwindSafe for Citation
impl Send for Citation
impl Sync for Citation
impl Unpin for Citation
impl UnsafeUnpin for Citation
impl UnwindSafe for Citation
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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