Item

Struct Item 

Source
pub struct Item {
Show 29 fields pub id: String, pub item_type: ItemType, pub author: Vec<Name>, pub contributor: Vec<Name>, pub issued: Option<Date>, pub updated: Option<Date>, pub published: Option<Date>, pub accessed: Option<Date>, pub category: Option<OrdinaryValue>, pub issn: Option<OrdinaryValue>, pub eissn: Option<OrdinaryValue>, pub issnl: Option<OrdinaryValue>, pub doi: Option<OrdinaryValue>, pub url: Option<OrdinaryValue>, pub title: Option<OrdinaryValue>, pub title_short: Option<OrdinaryValue>, pub summary: Option<OrdinaryValue>, pub abstract_text: Option<OrdinaryValue>, pub container_title: Option<OrdinaryValue>, pub journal_abbrevation: Option<OrdinaryValue>, pub volume: Option<OrdinaryValue>, pub issue: Option<OrdinaryValue>, pub page: Option<OrdinaryValue>, pub language: Option<OrdinaryValue>, pub source: Option<OrdinaryValue>, pub rights: Option<OrdinaryValue>, pub license: Option<OrdinaryValue>, pub note: Option<OrdinaryValue>, pub fields: BTreeMap<String, ItemValue>,
}
Expand description

An item carries the details of a single unique bibliographic resource.

The set of fields that an item may have is determined by the item type; in this library this is not checked: known fields have their field type defined and checked, but unrecognised fields are not errors when deserialised and go in the generic fields map.

Fields§

§id: String

Unique ID of this item within the CSL document.

§item_type: ItemType

Type of the resource.

§author: Vec<Name>

Author(s).

§contributor: Vec<Name>

Contributor(s) to the item.

§issued: Option<Date>

Date the item was issued on.

§updated: Option<Date>

Date the item was last updated.

§published: Option<Date>

Date the item was published on.

§accessed: Option<Date>

Date the item was accessed (for citations).

§category: Option<OrdinaryValue>

Category (scientific field or type of study)

§issn: Option<OrdinaryValue>

ISSN.

§eissn: Option<OrdinaryValue>

EISSN.

§issnl: Option<OrdinaryValue>

ISSNL.

§doi: Option<OrdinaryValue>

DOI.

§url: Option<OrdinaryValue>

URL.

§title: Option<OrdinaryValue>

Title.

§title_short: Option<OrdinaryValue>

Short title.

§summary: Option<OrdinaryValue>

Summary.

§abstract_text: Option<OrdinaryValue>

Abstract.

§container_title: Option<OrdinaryValue>

Name of the issuing publication.

§journal_abbrevation: Option<OrdinaryValue>

Abbreviated name of the issuing publication.

This has non-standard casing: journalAbbreviation.

§volume: Option<OrdinaryValue>

Volume number of the issuing publication.

This can be a numerical value but is often a string of a number.

§issue: Option<OrdinaryValue>

Issue number of the issuing publication.

This can be a numerical value but is often a string of a number.

§page: Option<OrdinaryValue>

Page number or page range in the issuing publication.

This can be a numerical value but is often a string of a number, or of the range in N-M format.

§language: Option<OrdinaryValue>

Language code.

§source: Option<OrdinaryValue>

Plain source name.

§rights: Option<OrdinaryValue>

Copyright statement.

§license: Option<OrdinaryValue>

License statement.

Sometimes used as a synonym of rights rather than actual licensing.

§note: Option<OrdinaryValue>

Note for extra details that are important to include in the citation but don’t have a standard field.

May be structured or semi-structured data, but as there is no convention processors shouldn’t make assumptions unless they can assert meaning.

§fields: BTreeMap<String, ItemValue>

Any field that is not directly supported by name.

Trait Implementations§

Source§

impl Clone for Item

Source§

fn clone(&self) -> Item

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 Item

Source§

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

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

impl Default for Item

Source§

fn default() -> Item

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

impl<'de> Deserialize<'de> for Item

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 Hash for Item

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 Item

Source§

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

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 Item

Source§

impl StructuralPartialEq for Item

Auto Trait Implementations§

§

impl Freeze for Item

§

impl RefUnwindSafe for Item

§

impl Send for Item

§

impl Sync for Item

§

impl Unpin for Item

§

impl UnwindSafe for Item

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