Struct hayagriva::Entry

source ·
pub struct Entry { /* private fields */ }
Expand description

A citable item in a bibliography.

Implementations§

source§

impl Entry

source

pub fn key(&self) -> &str

Get the key of the entry.

source

pub fn new(key: &str, entry_type: EntryType) -> Self

Construct a new, empty entry.

source

pub fn has(&self, key: &str) -> bool

Check whether the entry has some key.

source§

impl Entry

Getters.

source

pub fn entry_type(&self) -> &EntryType

Get the type of the entry.

source

pub fn parents(&self) -> &[Entry]

Get the parents of the entry.

source

pub fn title(&self) -> Option<&FormatString>

Title of the item.

source

pub fn authors(&self) -> Option<&[Person]>

Persons primarily responsible for creating the item.

source

pub fn date(&self) -> Option<&Date>

Date at which the item was published.

source

pub fn editors(&self) -> Option<&[Person]>

Persons responsible for selecting and revising the content of the item.

source

pub fn affiliated(&self) -> Option<&[PersonsWithRoles]>

Persons involved in the production of the item that are not authors or editors.

source

pub fn publisher(&self) -> Option<&FormatString>

Publisher of the item.

source

pub fn location(&self) -> Option<&FormatString>

Physical location at which the item was published or created.

source

pub fn organization(&self) -> Option<&FormatString>

Organization at/for which the item was created.

source

pub fn issue(&self) -> Option<&MaybeTyped<Numeric>>

For an item whose parent has multiple issues, indicates the position in the issue sequence. Also used to indicate the episode number for TV.

source

pub fn volume(&self) -> Option<&MaybeTyped<Numeric>>

For an item whose parent has multiple volumes/parts/seasons … of which this item is one.

source

pub fn volume_total(&self) -> Option<&Numeric>

Total number of volumes/parts/seasons … this item consists of.

source

pub fn edition(&self) -> Option<&MaybeTyped<Numeric>>

Published version of an item.

source

pub fn page_range(&self) -> Option<&MaybeTyped<Numeric>>

The range of pages within the parent this item occupies

source

pub fn page_total(&self) -> Option<&Numeric>

The total number of pages the item has.

source

pub fn time_range(&self) -> Option<&MaybeTyped<DurationRange>>

The time range within the parent this item starts and ends at.

source

pub fn runtime(&self) -> Option<&MaybeTyped<Duration>>

The total runtime of the item.

source

pub fn url(&self) -> Option<&QualifiedUrl>

Canonical public URL of the item, can have access date.

source

pub fn serial_number(&self) -> Option<&SerialNumber>

Any serial number or version describing the item that is not appropriate for the fields doi, edition, isbn or issn (may be assigned by the author of the item; especially useful for preprint archives).

source

pub fn language(&self) -> Option<&LanguageIdentifier>

The language of the item.

source

pub fn archive(&self) -> Option<&FormatString>

Name of the institution/collection where the item is kept.

source

pub fn archive_location(&self) -> Option<&FormatString>

Physical location of the institution/collection where the item is kept.

source

pub fn call_number(&self) -> Option<&FormatString>

The call number of the item in the institution/collection.

source

pub fn note(&self) -> Option<&FormatString>

Additional description to be appended in the bibliographic entry.

source

pub fn abstract_(&self) -> Option<&FormatString>

Abstract of the item (e.g. the abstract of a journal article).

source

pub fn annote(&self) -> Option<&FormatString>

Short markup, decoration, or annotation to the item (e.g., to indicate items included in a review);

For descriptive text (e.g., in an annotated bibliography), use note instead.

source

pub fn genre(&self) -> Option<&FormatString>

Type, class, or subtype of the item (e.g. “Doctoral dissertation” for a PhD thesis; “NIH Publication” for an NIH technical report); Do not use for topical descriptions or categories (e.g. “adventure” for an adventure movie).

source§

impl Entry

Setters.

source

pub fn set_parents(&mut self, parents: Vec<Entry>)

Set the parents of the entry.

source

pub fn set_title(&mut self, title: FormatString)

Set the title field.

source

pub fn set_authors(&mut self, authors: Vec<Person>)

Set the author field.

source

pub fn set_date(&mut self, date: Date)

Set the date field.

source

pub fn set_editors(&mut self, editors: Vec<Person>)

Set the editor field.

source

pub fn set_affiliated(&mut self, affiliated: Vec<PersonsWithRoles>)

Set the affiliated field.

source

pub fn set_publisher(&mut self, publisher: FormatString)

Set the publisher field.

source

pub fn set_location(&mut self, location: FormatString)

Set the location field.

source

pub fn set_organization(&mut self, organization: FormatString)

Set the organization field.

source

pub fn set_issue(&mut self, issue: MaybeTyped<Numeric>)

Set the issue field.

source

pub fn set_volume(&mut self, volume: MaybeTyped<Numeric>)

Set the volume field.

source

pub fn set_volume_total(&mut self, volume_total: Numeric)

Set the volume-total field.

source

pub fn set_edition(&mut self, edition: MaybeTyped<Numeric>)

Set the edition field.

source

pub fn set_page_range(&mut self, page_range: MaybeTyped<Numeric>)

Set the page-range field.

source

pub fn set_page_total(&mut self, page_total: Numeric)

Set the page-total field.

source

pub fn set_time_range(&mut self, time_range: MaybeTyped<DurationRange>)

Set the time-range field.

source

pub fn set_runtime(&mut self, runtime: MaybeTyped<Duration>)

Set the runtime field.

source

pub fn set_url(&mut self, url: QualifiedUrl)

Set the url field.

source

pub fn set_serial_number(&mut self, serial_number: SerialNumber)

Set the serial-number field.

source

pub fn set_language(&mut self, language: LanguageIdentifier)

Set the language field.

source

pub fn set_archive(&mut self, archive: FormatString)

Set the archive field.

source

pub fn set_archive_location(&mut self, archive_location: FormatString)

Set the archive-location field.

source

pub fn set_call_number(&mut self, call_number: FormatString)

Set the call-number field.

source

pub fn set_note(&mut self, note: FormatString)

Set the note field.

source

pub fn set_abstract_(&mut self, abstract_: FormatString)

Set the abstract field.

source

pub fn set_annote(&mut self, annote: FormatString)

Set the annote field.

source

pub fn set_genre(&mut self, genre: FormatString)

Set the genre field.

source§

impl Entry

source

pub fn map<'a, F, T>(&'a self, f: F) -> Option<T>
where F: FnMut(&'a Self) -> Option<T>,

Get the unconverted value of a certain field from this entry or any of its parents.

source

pub fn map_parents<'a, F, T>(&'a self, f: F) -> Option<T>
where F: FnMut(&'a Self) -> Option<T>,

Get the unconverted value of a certain field from the parents only by BFS.

source

pub fn bound_select(&self, selector: &Selector, binding: &str) -> Option<&Entry>

Apply a selector and return a bound parent entry or self.

source

pub fn date_any(&self) -> Option<&Date>

Will recursively get a date off either the entry or any of its ancestors.

source

pub fn url_any(&self) -> Option<&QualifiedUrl>

Will recursively get an URL off either the entry or any of its ancestors.

source

pub fn keyed_serial_number(&self, key: &str) -> Option<&str>

Retrieve a keyed serial number.

source

pub fn set_keyed_serial_number(&mut self, key: &str, value: String)

Set a keyed serial number.

source

pub fn doi(&self) -> Option<&str>

The Digital Object Identifier of the item.

source

pub fn set_doi(&mut self, doi: String)

Set the doi field.

source

pub fn isbn(&self) -> Option<&str>

International Standard Book Number (ISBN), prefer ISBN-13.

source

pub fn set_isbn(&mut self, isbn: String)

Set the isbn field.

source

pub fn issn(&self) -> Option<&str>

International Standard Serial Number (ISSN).

source

pub fn set_issn(&mut self, issn: String)

Set the issn field.

source

pub fn pmid(&self) -> Option<&str>

PubMed Identifier (PMID).

source

pub fn set_pmid(&mut self, pmid: String)

Set the pmid field.

source

pub fn pmcid(&self) -> Option<&str>

PubMed Central Identifier (PMCID).

source

pub fn set_pmcid(&mut self, pmcid: String)

Set the pmcid field.

source

pub fn arxiv(&self) -> Option<&str>

ArXiv identifier.

source

pub fn set_arxiv(&mut self, arxiv: String)

Set the arxiv field.

Trait Implementations§

source§

impl Clone for Entry

source§

fn clone(&self) -> Entry

Returns a copy 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 Entry

source§

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

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

impl FromIterator<Entry> for Library

source§

fn from_iter<T: IntoIterator<Item = Entry>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for Entry

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 Entry

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Entry

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 TryFrom<&Entry> for Entry

§

type Error = TypeError

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

fn try_from(entry: &Entry) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Eq for Entry

source§

impl StructuralPartialEq for Entry

Auto Trait Implementations§

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnwindSafe for Entry

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

§

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

§

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

§

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.