Reference

Struct Reference 

Source
pub struct Reference {
Show 71 fields pub work_type: RefType, pub authors: Vec<Name>, pub abbreviation: Option<String>, pub abstract_text: Option<String>, pub collection_doi: Option<String>, pub collection_title: Option<String>, pub collection_type: Option<String>, pub commit: Option<String>, pub conference: Option<EntityName>, pub contact: Vec<Name>, pub copyright: Option<String>, pub data_type: Option<String>, pub database_provider: Option<EntityName>, pub database: Option<String>, pub date_accessed: Option<Date>, pub date_downloaded: Option<Date>, pub date_published: Option<Date>, pub date_released: Option<Date>, pub department: Option<String>, pub doi: Option<String>, pub edition: Option<String>, pub editors: Vec<Name>, pub editors_series: Vec<Name>, pub start: Option<u64>, pub end: Option<u64>, pub entry: Option<String>, pub filename: Option<String>, pub format: Option<String>, pub identifiers: Vec<Identifier>, pub institution: Option<EntityName>, pub isbn: Option<String>, pub issn: Option<String>, pub issue: Option<String>, pub issue_date: Option<String>, pub issue_title: Option<String>, pub journal: Option<String>, pub keywords: Vec<String>, pub languages: Vec<String>, pub license: Option<License>, pub license_url: Option<Url>, pub loc_end: Option<u64>, pub loc_start: Option<u64>, pub location: Option<EntityName>, pub medium: Option<String>, pub month: Option<u8>, pub nihmsid: Option<String>, pub notes: Option<String>, pub number: Option<String>, pub number_volumes: Option<u64>, pub pages: Option<u64>, pub patent_states: Vec<String>, pub pmcid: Option<String>, pub publisher: Option<EntityName>, pub recipients: Vec<Name>, pub repository: Option<Url>, pub repository_artifact: Option<Url>, pub repository_code: Option<Url>, pub scope: Option<String>, pub section: Option<String>, pub senders: Vec<Name>, pub status: Option<PublicationStatus>, pub term: Option<String>, pub thesis_type: Option<String>, pub title: Option<String>, pub translators: Vec<Name>, pub url: Option<Url>, pub version: Option<String>, pub volume: Option<u64>, pub volume_title: Option<String>, pub year: Option<u64>, pub year_original: Option<i64>,
}
Expand description

A reference for a work.

Fields§

§work_type: RefType

The type of the referenced work.

This is required.

§authors: Vec<Name>

The authors of the work.

This is required and must contain at least one author.

§abbreviation: Option<String>

The abbreviation of a work.

§abstract_text: Option<String>

The abstract of the work.

  • If the work is a journal paper or other academic work, The abstract of the work.

  • If the work is a film broadcast or similar, The synopsis of the work.

§collection_doi: Option<String>

The DOI of a collection containing the work.

§collection_title: Option<String>

The title of a collection or proceedings.

§collection_type: Option<String>

The type of a collection.

By convention this should be in lowercase.

§commit: Option<String>

The commit hash or revision number of the work, if it is software.

By convention:

  • if this is a Git hash, it should be bare lowercase hex, e.g. 1ff847d81f29c45a3a1a5ce73d38e45c2f319bba;
  • if this is a decimal revision or build number, it should be preceded by a label, e.g. Revision: 8612.
§conference: Option<EntityName>

The conference where the work was presented.

§contact: Vec<Name>

The contact person, group, company, etc. for a work.

§copyright: Option<String>

The copyright information pertaining to the work.

§data_type: Option<String>

The data type of a data set.

§database_provider: Option<EntityName>

The provider of the database where a work was accessed/is stored.

§database: Option<String>

The name of the database where a work was accessed/is stored.

§date_accessed: Option<Date>

The date the work was accessed.

§date_downloaded: Option<Date>

The date the work has been downloaded.

§date_published: Option<Date>

The date the work has been published.

§date_released: Option<Date>

The date the work has been released.

§department: Option<String>

The department where a work has been produced.

§doi: Option<String>

The DOI of the work.

§edition: Option<String>

The edition of the work.

§editors: Vec<Name>

The editor(s) of a work.

§editors_series: Vec<Name>

The editor(s) of a series in which the work has been published.

§start: Option<u64>

The start page of the work.

§end: Option<u64>

The end page of the work.

§entry: Option<String>

An entry in the collection that constitutes the work.

§filename: Option<String>

The name of the electronic file containing the work.

§format: Option<String>

The format in which a work is represented.

§identifiers: Vec<Identifier>

The identifier(s) of the work.

§institution: Option<EntityName>

The institution where a work has been produced or published.

§isbn: Option<String>

The ISBN of the work.

The value is not validated.

§issn: Option<String>

The ISSN of the work.

The value is not validated.

§issue: Option<String>

The issue of a periodical in which a work appeared.

§issue_date: Option<String>

The publication date of the issue of a periodical in which a work appeared.

Note this is a freeform string.

§issue_title: Option<String>

The name of the issue of a periodical in which the work appeared.

§journal: Option<String>

The name of the journal/magazine/newspaper/periodical where the work was published.

§keywords: Vec<String>

Keywords pertaining to the work.

§languages: Vec<String>

The language identifier(s) of the work.

These should be ISO639 strings in lowercase alpha-2 or alpha-3, but this library does not validate this.

§license: Option<License>

SPDX license expression(s).

§license_url: Option<Url>

The URL of the license text under which the work is licensed.

This should only be used for non-standard licenses not included in the SPDX License List.

§loc_end: Option<u64>

The line of code in the file where the work ends.

§loc_start: Option<u64>

The line of code in the file where the work starts.

§location: Option<EntityName>

The location of the work.

§medium: Option<String>

The medium of the work.

§month: Option<u8>

The month in which a work has been published.

Should be an integer in the range 1-12. Note this is not validated.

§nihmsid: Option<String>

The NIHMSID of a work.

§notes: Option<String>

Notes pertaining to the work.

Note that this key should contain notes that may be picked up by some downstream tooling (e.g., reference managers), but not others (e.g., a software index).

§number: Option<String>

The (library) accession number for a work.

§number_volumes: Option<u64>

The number of volumes making up the collection in which the work has been published.

§pages: Option<u64>

The number of pages of the work.

§patent_states: Vec<String>

The states for which a patent is granted.

§pmcid: Option<String>

The PMCID of a work.

The value is not validated.

§publisher: Option<EntityName>

The publisher who has published the work.

§recipients: Vec<Name>

The recipient(s) of a personal communication.

§repository: Option<Url>

The URL of the work in a repository/archive.

This is to be used when the repository is neither a source code repository nor a build artifact repository. For source code, use the repository_code field; for binary releases or other built forms, use the repository_artifact field.

§repository_artifact: Option<Url>

The URL of the work in a build artifact/binary repository.

§repository_code: Option<Url>

The URL of the work in a source code repository.

§scope: Option<String>

The scope of the reference, e.g., the section of the work it adheres to.

§section: Option<String>

The section of a work that is referenced.

§senders: Vec<Name>

The sender(s) of a personal communication.

§status: Option<PublicationStatus>

The publication status of the work.

§term: Option<String>

The term being referenced if the work is a dictionary or encyclopedia.

§thesis_type: Option<String>

The type of the thesis that is the work.

§title: Option<String>

The title of the work.

§translators: Vec<Name>

The translator(s) of a work.

§url: Option<Url>

The URL of the work.

§version: Option<String>

The version of the work.

§volume: Option<u64>

The volume of the periodical in which a work appeared.

§volume_title: Option<String>

The title of the volume in which the work appeared.

§year: Option<u64>

The year in which a work has been published.

§year_original: Option<i64>

The year of the original publication.

Trait Implementations§

Source§

impl Clone for Reference

Source§

fn clone(&self) -> Reference

Returns a duplicate 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 Reference

Source§

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

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

impl Default for Reference

Source§

fn default() -> Reference

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Reference

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Reference

Source§

fn eq(&self, other: &Reference) -> 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 Serialize for Reference

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Reference

Source§

impl StructuralPartialEq for Reference

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,