Skip to main content

Type

Enum Type 

Source
pub enum Type {
Show 30 variants BookSection, Monograph, ReportComponent, Report, PeerReview, BookTrack, JournalArticle, BookPart, Other, Book, JournalVolume, BookSet, ReferenceEntry, ProceedingsArticle, Journal, Component, BookChapter, ProceedingsSeries, ReportSeries, Proceedings, Database, Standard, ReferenceBook, PostedContent, JournalIssue, Dissertation, Grant, Dataset, BookSeries, EditedBook,
}
Expand description

One of the work types crossref registers, as listed by /types.

assert_eq!(Type::JournalArticle, Type::from_str("journal-article").unwrap());
assert_eq!("Journal Article", Type::JournalArticle.label());

Variants§

§

BookSection

book-section, which crossref labels Book Section

§

Monograph

monograph, which crossref labels Monograph

§

ReportComponent

report-component, which crossref labels Report Component

§

Report

report, which crossref labels Report

§

PeerReview

peer-review, which crossref labels Peer Review

§

BookTrack

book-track, which crossref labels Book Track

§

JournalArticle

journal-article, which crossref labels Journal Article

§

BookPart

book-part, which crossref labels Part

§

Other

other, which crossref labels Other

§

Book

book, which crossref labels Book

§

JournalVolume

journal-volume, which crossref labels Journal Volume

§

BookSet

book-set, which crossref labels Book Set

§

ReferenceEntry

reference-entry, which crossref labels Reference Entry

§

ProceedingsArticle

proceedings-article, which crossref labels Proceedings Article

§

Journal

journal, which crossref labels Journal

§

Component

component, which crossref labels Component

§

BookChapter

book-chapter, which crossref labels Book Chapter

§

ProceedingsSeries

proceedings-series, which crossref labels Proceedings Series

§

ReportSeries

report-series, which crossref labels Report Series

§

Proceedings

proceedings, which crossref labels Proceedings

§

Database

database, which crossref labels Database

§

Standard

standard, which crossref labels Standard

§

ReferenceBook

reference-book, which crossref labels Reference Book

§

PostedContent

posted-content, which crossref labels Posted Content

§

JournalIssue

journal-issue, which crossref labels Journal Issue

§

Dissertation

dissertation, which crossref labels Dissertation

§

Grant

grant, which crossref labels Grant

§

Dataset

dataset, which crossref labels Dataset

§

BookSeries

book-series, which crossref labels Book Series

§

EditedBook

edited-book, which crossref labels Edited Book

Implementations§

Source§

impl Type

Source

pub const ALL: &'static [Type]

Every type crossref registers, in the order /types lists them.

Source

pub fn label(&self) -> &'static str

the display-friendly label crossref gives this type

Source

pub fn id(&self) -> &'static str

the identifier crossref knows this type by

Trait Implementations§

Source§

impl Clone for Type

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 Copy for Type

Source§

impl Debug for Type

Source§

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

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

impl<'de> Deserialize<'de> for Type

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 Eq for Type

Source§

impl From<Type> for CrossrefType

Source§

fn from(val: Type) -> Self

Converts to this type from the input type.
Source§

impl FromStr for Type

Source§

type Err = Error

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

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

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

impl Hash for Type

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 Type

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for Type

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 StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnsafeUnpin for Type

§

impl UnwindSafe for Type

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