Struct Record

Source
pub struct Record {
Show 20 fields pub author: Vec<Author>, pub book: Option<String>, pub place: Option<String>, pub date: Option<String>, pub editor: Vec<String>, pub government: Option<String>, pub issuer: Option<String>, pub journal: Option<String>, pub keywords: Option<Vec<String>>, pub label: Option<String>, pub issue_number: Option<String>, pub page_number: Option<String>, pub other: Option<String>, pub author_np: Option<String>, pub report: Option<String>, pub series: Option<String>, pub title: Option<String>, pub volume: Option<String>, pub annotation: Option<String>, pub rec_type: RecordType,
}
Expand description

A refer record.

The record is exhaustive to the refer specification.

Fields§

§author: Vec<Author>

The author list

§book: Option<String>

The name of the book

§place: Option<String>

The place

§date: Option<String>

Date of publication

§editor: Vec<String>

The editor

§government: Option<String>

US Government ordering number.

§issuer: Option<String>

The publisher (issuer)

§journal: Option<String>

For an article in a journal, the name of the journal.

§keywords: Option<Vec<String>>

Keywords to be used for searching.

§label: Option<String>

Label.

§issue_number: Option<String>§page_number: Option<String>

Page number. A range of pages can be specified as m-n.

§other: Option<String>

Other information. This is usually printed at the end of the reference.

§author_np: Option<String>

The name of the author, if the author is not a person. This will only be used if there are no %A fields. There can only be one %Q field.

§report: Option<String>

Technical report number.

§series: Option<String>

Series name.

§title: Option<String>

Title. For an article in a book or journal, this should be the title of the article.

§volume: Option<String>

Volume number of the journal or book.

§annotation: Option<String>

Annotation.

§rec_type: RecordType

The type of the record, the default is [RecordType::None].

Implementations§

Source§

impl Record

Source

pub fn record_type(&self) -> Result<RecordType, Error>

Return the record type of the record. At the moment, only books and journal types are supported.

Note that the %B field must be non empty (even a space will do) for a record to be treated as a book. This is also the case for %J, but usually in journal articles the journal is always present, whereas a book may not always contain citable articles within.

Trait Implementations§

Source§

impl Clone for Record

Source§

fn clone(&self) -> Record

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Record

Source§

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

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

impl Default for Record

Source§

fn default() -> Record

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

impl Display for Record

Source§

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

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

impl PartialEq for Record

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const 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 StructuralPartialEq for Record

Auto Trait Implementations§

§

impl Freeze for Record

§

impl RefUnwindSafe for Record

§

impl Send for Record

§

impl Sync for Record

§

impl Unpin for Record

§

impl UnwindSafe for Record

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.