pub enum WorkKind {
Document,
Software,
DataSet,
FactSheet,
WebPage,
}Expand description
What kind of thing a work is.
Deliberately a short list of standalone works, because those are the ones this phase can render correctly. A journal article or a book chapter is a work inside a greater whole, and citing one needs a second model — the container, its editors, the volume, the issue, the page range. Rather than carry half of that and emit a reference with the container guessed at, the kind is simply not spellable yet. Refusing at the type is the same rule this module applies everywhere else, one level up.
Deliberately not #[non_exhaustive], and this is the enum here most likely
to gain a variant. That is the reason rather than an objection: the kind
decides whether a bracketed descriptor is required, whether a locator is
required, and whether the title is italicised. A wildcard arm would answer
all three for a journal article the way it answers them for a book, and
quietly emit a wrong reference — so a new kind has to break the build in the
renderer until somebody says what it is.
Variants§
Document
A standalone document: a book, a report, a specification, a standard.
Software
Computer software.
DataSet
A data set.
FactSheet
A fact sheet.
WebPage
A page on a website.
Implementations§
Trait Implementations§
impl Copy for WorkKind
Source§impl<'de> Deserialize<'de> for WorkKind
impl<'de> Deserialize<'de> for WorkKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WorkKind
Source§impl Ord for WorkKind
impl Ord for WorkKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for WorkKind
impl PartialOrd for WorkKind
impl StructuralPartialEq for WorkKind
Auto Trait Implementations§
impl Freeze for WorkKind
impl RefUnwindSafe for WorkKind
impl Send for WorkKind
impl Sync for WorkKind
impl Unpin for WorkKind
impl UnsafeUnpin for WorkKind
impl UnwindSafe for WorkKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.