Struct Bibliography
pub struct Bibliography {
pub entries: BTreeMap<String, BibEntry>,
}Expand description
A parsed bibliography: every [BibEntry] keyed by its citation key.
Entries live in a BTreeMap, so iterating them yields a deterministic,
sorted-by-citation-key order that is easy to assert on in tests. Build
one from BibTeX source with parse_bibtex, which
rejects a duplicate citation key with
BibParseErrorKind::DuplicateKey
at the duplicate key’s offset. Last-value-wins applies only to a repeated
field name inside one entry.
§Examples
use mos_bib::Bibliography;
let empty = Bibliography::default();
assert!(empty.entries.is_empty());Fields§
§entries: BTreeMap<String, BibEntry>Parsed entries keyed by citation key, in sorted key order.
Trait Implementations§
§impl Clone for Bibliography
impl Clone for Bibliography
§fn clone(&self) -> Bibliography
fn clone(&self) -> Bibliography
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for Bibliography
impl Debug for Bibliography
§impl Default for Bibliography
impl Default for Bibliography
§fn default() -> Bibliography
fn default() -> Bibliography
Returns the “default value” for a type. Read more
impl Eq for Bibliography
§impl PartialEq for Bibliography
impl PartialEq for Bibliography
impl StructuralPartialEq for Bibliography
Auto Trait Implementations§
impl Freeze for Bibliography
impl RefUnwindSafe for Bibliography
impl Send for Bibliography
impl Sync for Bibliography
impl Unpin for Bibliography
impl UnsafeUnpin for Bibliography
impl UnwindSafe for Bibliography
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