pub struct Entry {
pub citekey: String,
pub title: Option<String>,
pub authors: Vec<String>,
pub year: Option<i32>,
pub doi: Option<String>,
pub arxiv_id: Option<String>,
pub journal: Option<String>,
pub url: Option<String>,
pub abstract: Option<String>,
}Expand description
Format-neutral bibliography entry. Populated by the BibTeX parser
(via Entry::from_bib_entry) or the CSL-JSON parser (via
Entry::from_csl_value) so the diff layer doesn’t care which
flavor it’s looking at.
Fields§
§citekey: String§title: Option<String>§year: Option<i32>§doi: Option<String>§arxiv_id: Option<String>§journal: Option<String>§url: Option<String>§abstract: Option<String>Implementations§
Source§impl Entry
impl Entry
Sourcepub fn from_bib_entry(b: &BibEntry) -> Self
pub fn from_bib_entry(b: &BibEntry) -> Self
Lift a parsed BibTeX entry into the format-neutral shape. DOI
is already normalized by normalize_doi inside parse_bibtex.
Sourcepub fn from_csl_value(v: &Value) -> Option<Self>
pub fn from_csl_value(v: &Value) -> Option<Self>
Lift a single CSL-JSON object into the format-neutral shape. The
canonical 1.0.2 schema fixes field names: id, title,
author[].family|given, issued.date-parts[0][0], DOI, URL,
container-title, abstract. Anything else is dropped.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Entry
impl<'de> Deserialize<'de> for Entry
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§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
Compare self to
key and return true if they are equal.