Enum Variable

Source
pub enum Variable {
Show 48 variants Abstract, Annote, Archive, ArchiveLocation, ArchivePlace, Authority, CallNumber, CitationLabel, CollectionTitle, ContainerTitle, ContainerTitleShort, Dimensions, DOI, Event, EventPlace, Genre, ISBN, ISSN, Jurisdiction, Keyword, Medium, Note, OriginalPublisher, OriginalPublisherPlace, OriginalTitle, PMCID, PMID, Publisher, PublisherPlace, References, ReviewedTitle, Scale, Section, Source, Status, Title, TitleShort, URL, Version, YearSuffix, Hereinafter, Dummy, LocatorExtra, VolumeTitle, Committee, DocumentName, GazetteFlag, Language,
}

Variants§

§

Abstract

abstract of the item (e.g. the abstract of a journal article)

§

Annote

reader’s notes about the item content

§

Archive

archive storing the item

§

ArchiveLocation

storage location within an archive (e.g. a box and folder number) technically the spec says use an underscore, but that’s probably a typo.

§

ArchivePlace

geographic location of the archive,

§

Authority

issuing or judicial authority (e.g. “USPTO” for a patent, “Fairfax Circuit Court” for a legal case) CSL-M only

§

CallNumber

active={true} call number (to locate the item in a library)

§

CitationLabel

label identifying the item in in-text citations of label styles (e.g. “Ferr78”). May be assigned by the CSL processor based on item metadata.

§

CollectionTitle

title of the collection holding the item (e.g. the series title for a book)

§

ContainerTitle

title of the container holding the item (e.g. the book title for a book chapter, the journal title for a journal article)

§

ContainerTitleShort

short/abbreviated form of “container-title” (also accessible through the “short” form of the “container-title” variable)

§

Dimensions

physical (e.g. size) or temporal (e.g. running time) dimensions of the item

§

DOI

Digital Object Identifier (e.g. “10.1128/AEM.02591-07”)

§

Event

name of the related event (e.g. the conference name when citing a conference paper)

§

EventPlace

geographic location of the related event (e.g. “Amsterdam, the Netherlands”)

§

Genre

class, type or genre of the item (e.g. “adventure” for an adventure movie, “PhD dissertation” for a PhD thesis)

§

ISBN

International Standard Book Number

§

ISSN

International Standard Serial Number

§

Jurisdiction

geographic scope of relevance (e.g. “US” for a US patent)

§

Keyword

keyword(s) or tag(s) attached to the item

§

Medium

medium description (e.g. “CD”, “DVD”, etc.)

§

Note

(short) inline note giving additional item details (e.g. a concise summary or commentary)

§

OriginalPublisher

original publisher, for items that have been republished by a different publisher

§

OriginalPublisherPlace

geographic location of the original publisher (e.g. “London, UK”)

§

OriginalTitle

title of the original version (e.g. “Война и мир”, the untranslated Russian title of “War and Peace”)

§

PMCID

PubMed Central reference number

§

PMID

PubMed reference number

§

Publisher

publisher

§

PublisherPlace

geographic location of the publisher

§

References

resources related to the procedural history of a legal case

§

ReviewedTitle

title of the item reviewed by the current item

§

Scale

scale of e.g. a map

§

Section

container section holding the item (e.g. “politics” for a newspaper article). TODO: CSL-M appears to interpret this as a number variable?

§

Source

from whence the item originates (e.g. a library catalog or database)

§

Status

(publication) status of the item (e.g. “forthcoming”)

§

Title

primary title of the item

§

TitleShort

short/abbreviated form of “title” (also accessible through the “short” form of the “title” variable)

§

URL

URL (e.g. “https://aem.asm.org/cgi/content/full/74/9/2766”)

§

Version

version of the item (e.g. “2.0.9” for a software program)

§

YearSuffix

disambiguating year suffix in author-date styles (e.g. “a” in “Doe, 1999a”)

§

Hereinafter

CSL-M only

§

Dummy

CSL-M only

§

LocatorExtra

CSL-M only

§

VolumeTitle

CSL-M only

§

Committee

CSL-M only

Not documented in the CSL-M spec.

§

DocumentName

CSL-M only

Not documented in the CSL-M spec. See Indigo Book section ‘R26. Short Form Citation for Court Documents’ for its intended use case, and the Juris-M US cheat sheet

§

GazetteFlag

CSL-M only

Not documented in the CSL-M spec.

TODO: I think variable=“gazette-flag” may have been superseded by type=“gazette”, but clearly you can still tick the “Gazette Ref” checkbox in Juris-M on a statute. Ask Frank. See also https://juris-m.github.io/cheat-sheets/us.pdf

§

Language

Implementations§

Source§

impl Variable

Source

pub fn should_replace_hyphens(self) -> bool

Trait Implementations§

Source§

impl AsRef<str> for Variable

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for Variable

Source§

fn clone(&self) -> Variable

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Variable

Source§

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

Formats the value using the given formatter. Read more
Source§

impl EnumProperty for Variable

Source§

fn get_str(&self, prop: &str) -> Option<&'static str>

Source§

fn get_int(&self, _: &str) -> Option<usize>

Source§

fn get_bool(&self, _: &str) -> Option<bool>

Source§

impl FromStr for Variable

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Variable, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Variable

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Variable

Source§

fn eq(&self, other: &Variable) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Variable

Source§

impl Eq for Variable

Source§

impl StructuralPartialEq for Variable

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.

Source§

impl<T> GetAttribute for T
where T: FromStr + EnumProperty,

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> 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.