Struct biblatex::Bibliography
source · pub struct Bibliography { /* private fields */ }
Expand description
A fully parsed bibliography.
Implementations§
source§impl Bibliography
impl Bibliography
sourcepub fn parse(src: &str) -> Result<Self, ParseError>
pub fn parse(src: &str) -> Result<Self, ParseError>
Parse a bibliography from a source string.
sourcepub fn from_raw(raw: RawBibliography<'_>) -> Result<Self, ParseError>
pub fn from_raw(raw: RawBibliography<'_>) -> Result<Self, ParseError>
Construct a bibliography from a raw bibliography, with the xdata
and
crossref
links resolved.
sourcepub fn get_mut(&mut self, key: &str) -> Option<&mut Entry>
pub fn get_mut(&mut self, key: &str) -> Option<&mut Entry>
Returns a mutable reference to the entry with the given cite key.
sourcepub fn insert(&mut self, entry: Entry) -> Option<Entry>
pub fn insert(&mut self, entry: Entry) -> Option<Entry>
Insert an entry into the bibliography.
If an entry with the same cite key is already present, the entry is updated and the old entry is returned.
sourcepub fn alias(&mut self, key: &str, alias: impl Into<String>)
pub fn alias(&mut self, key: &str, alias: impl Into<String>)
Add an alias for a cite key.
Does nothing if no entry with the given cite key exists.
sourcepub fn iter_mut(&mut self) -> IterMut<'_, Entry>
pub fn iter_mut(&mut self) -> IterMut<'_, Entry>
A mutable iterator over the bibliography’s entries.
sourcepub fn into_vec(self) -> Vec<Entry>
pub fn into_vec(self) -> Vec<Entry>
Consume this struct and return a vector of the bibliography’s entries.
sourcepub fn write_biblatex(&self, sink: impl Write) -> Result
pub fn write_biblatex(&self, sink: impl Write) -> Result
Write the entry into a writer in the BibLaTeX format.
sourcepub fn to_biblatex_string(&self) -> String
pub fn to_biblatex_string(&self) -> String
Serialize this bibliography into a BibLaTeX string.
sourcepub fn write_bibtex(&self, sink: impl Write) -> Result
pub fn write_bibtex(&self, sink: impl Write) -> Result
Write the entry into a writer in the BibTeX format.
sourcepub fn to_bibtex_string(&self) -> String
pub fn to_bibtex_string(&self) -> String
Serialize this bibliography into a BibTeX string.
Trait Implementations§
source§impl Clone for Bibliography
impl Clone for Bibliography
source§fn clone(&self) -> Bibliography
fn clone(&self) -> Bibliography
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Bibliography
impl Debug for Bibliography
source§impl Default for Bibliography
impl Default for Bibliography
source§fn default() -> Bibliography
fn default() -> Bibliography
source§impl IntoIterator for Bibliography
impl IntoIterator for Bibliography
source§impl PartialEq for Bibliography
impl PartialEq for Bibliography
source§fn eq(&self, other: &Bibliography) -> bool
fn eq(&self, other: &Bibliography) -> bool
self
and other
values to be equal, and is used
by ==
.