Skip to main content

Work

Struct Work 

Source
pub struct Work {
Show 54 fields pub publisher: Option<String>, pub title: Vec<String>, pub original_title: Option<Vec<String>>, pub language: Option<String>, pub short_title: Option<Vec<String>>, pub abstract_: Option<String>, pub references_count: Option<i32>, pub is_referenced_by_count: Option<i32>, pub source: Option<String>, pub journal_issue: Option<Issue>, pub prefix: Option<String>, pub doi: String, pub url: Option<String>, pub member: Option<String>, pub type_: Option<String>, pub created: Option<Date>, pub date: Option<Date>, pub deposited: Option<Date>, pub score: Option<f32>, pub indexed: Option<Date>, pub issued: Option<PartialDate>, pub posted: Option<PartialDate>, pub accepted: Option<PartialDate>, pub subtitle: Option<Vec<String>>, pub container_title: Option<Vec<String>>, pub short_container_title: Option<Vec<String>>, pub group_title: Option<String>, pub issue: Option<String>, pub volume: Option<String>, pub page: Option<String>, pub article_number: Option<String>, pub published_print: Option<PartialDate>, pub published_online: Option<PartialDate>, pub subject: Option<Vec<String>>, pub issn: Option<Vec<String>>, pub issn_type: Option<Vec<ISSN>>, pub isbn: Option<Vec<String>>, pub archive: Option<Vec<String>>, pub license: Option<Vec<License>>, pub funder: Option<Vec<FundingBody>>, pub assertion: Option<Vec<Assertion>>, pub author: Option<Vec<Contributor>>, pub editor: Option<Vec<Contributor>>, pub chair: Option<Vec<Contributor>>, pub translator: Option<Vec<Contributor>>, pub update_to: Option<Vec<Update>>, pub update_policy: Option<String>, pub link: Option<Vec<ResourceLink>>, pub clinical_trial_number: Option<Vec<ClinicalTrialNumber>>, pub alternative_id: Option<Vec<String>>, pub reference: Option<Vec<Reference>>, pub content_domain: Option<ContentDomain>, pub relation: Option<Relations>, pub review: Option<Review>,
}
Expand description

the main return type of the crossref api represents a publication based on the crossref rest-api-doc with minor adjustments

Fields§

§publisher: Option<String>

Name of work’s publisher

Optional for the same reason as Work::type_: it is deposited by the member, not assigned by crossref.

§title: Vec<String>

Work titles, including translated titles

Absent for roughly 5% of works – most component records and a scattering of datasets carry no title at all – so an untitled work deserializes to an empty list rather than failing the whole page.

§original_title: Option<Vec<String>>

Work titles in the work’s original publication language

§language: Option<String>

the language of this work

§short_title: Option<Vec<String>>

Abstract as a JSON string or a JATS XML snippet encoded into a JSON string

§abstract_: Option<String>

Abstract as a JSON string or a JATS XML snippet encoded into a JSON string

§references_count: Option<i32>

Count of outbound references deposited with Crossref

§is_referenced_by_count: Option<i32>

Count of inbound references deposited with Crossref

§source: Option<String>

Currently always Crossref

§journal_issue: Option<Issue>

which issue of the containing journal this work appeared in

§prefix: Option<String>

DOI prefix identifier of the form http://id.crossref.org/prefix/DOI_PREFIX

§doi: String

DOI of the work

§url: Option<String>

URL form of the work’s DOI

§member: Option<String>

Member identifier of the form http://id.crossref.org/member/MEMBER_ID

Absent from a handful of records whose depositing member no longer exists.

§type_: Option<String>

Enumeration, one of the type ids from https://api.crossref.org/v1/types

Crossref validates member deposits loosely, so nearly every field can be absent from a record – roughly one work in 20 000 has no type. Only Work::doi is required, and even that assumes the query did not drop it with WorksQuery::elements.

§created: Option<Date>

the day this work entry was created

Absent when the query narrowed the response with WorksQuery::elements.

§date: Option<Date>

Date on which the DOI was first registered

§deposited: Option<Date>

Date on which the work metadata was most recently updated

§score: Option<f32>

the score of the publication if any not included in the crossrif api spec

§indexed: Option<Date>

Date on which the work metadata was most recently indexed. Re-indexing does not imply a metadata change, see deposited for the most recent metadata change date

Absent when the query narrowed the response with WorksQuery::elements.

§issued: Option<PartialDate>

Earliest of published-print and published-online

§posted: Option<PartialDate>

ate on which posted content was made available online

§accepted: Option<PartialDate>

Date on which a work was accepted, after being submitted, during a submission process

§subtitle: Option<Vec<String>>

Work subtitles, including original language and translated

§container_title: Option<Vec<String>>

Full titles of the containing work (usually a book or journal)

§short_container_title: Option<Vec<String>>

Abbreviated titles of the containing work

§group_title: Option<String>

Group title for posted content

§issue: Option<String>

Issue number of an article’s journal

§volume: Option<String>

Volume number of an article’s journal

§page: Option<String>

Pages numbers of an article within its journal

§article_number: Option<String>

the number of the corresponding article

§published_print: Option<PartialDate>

Date on which the work was published in print

§published_online: Option<PartialDate>

Date on which the work was published online

§subject: Option<Vec<String>>

Subject category names, a controlled vocabulary from Sci-Val. Available for most journal articles

§issn: Option<Vec<String>>

ISSNs of the containing journal, print and electronic

§issn_type: Option<Vec<ISSN>>

List of ISSNs with ISSN type information

§isbn: Option<Vec<String>>

ISBNs of the containing book

§archive: Option<Vec<String>>

names of the archives that preserve this work

§license: Option<Vec<License>>

the licenses this work is published under

§funder: Option<Vec<FundingBody>>

the bodies that funded the work, and the awards they made

§assertion: Option<Vec<Assertion>>

Crossmark assertions the publisher made about the work

§author: Option<Vec<Contributor>>

the work’s authors, in the order they were deposited

§editor: Option<Vec<Contributor>>

the editors of the containing work

§chair: Option<Vec<Contributor>>

the chairs of the containing proceedings

§translator: Option<Vec<Contributor>>

the work’s translators

§update_to: Option<Vec<Update>>

works this one is an editorial update to, e.g. a retraction or correction

§update_policy: Option<String>

Link to an update policy covering Crossmark updates for this work

§link: Option<Vec<ResourceLink>>

URLs to full-text locations

§clinical_trial_number: Option<Vec<ClinicalTrialNumber>>

the clinical trials the work reports on

§alternative_id: Option<Vec<String>>

Other identifiers for the work provided by the depositing member

§reference: Option<Vec<Reference>>

List of references made by the work

§content_domain: Option<ContentDomain>

Information on domains that support Crossmark for this work

§relation: Option<Relations>

Relations to other works

§review: Option<Review>

Peer review metadata, on works of type peer-review

Implementations§

Source§

impl Work

Source

pub fn citekey(&self) -> Option<String>

A short citation key for this work, in the common AuthorYear style.

Built from the family names of the authors and the issued year: Smith2019 for a single author, Smith&Jones2019 for two, and SmithEtAl2019 for three or more.

Returns None if the work carries no author with a family name, or no issued date to take a year from.

Trait Implementations§

Source§

impl Clone for Work

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Work

Source§

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

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

impl<'de> Deserialize<'de> for Work

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 Serialize for Work

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

Auto Trait Implementations§

§

impl Freeze for Work

§

impl RefUnwindSafe for Work

§

impl Send for Work

§

impl Sync for Work

§

impl Unpin for Work

§

impl UnsafeUnpin for Work

§

impl UnwindSafe for Work

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more