pub struct Model { /* private fields */ }Expand description
A file’s regular entries, @string definitions, and @string uses.
Equality lets incremental queries avoid recomputing unchanged dependents.
Implementations§
Source§impl Model
impl Model
Sourcepub fn build(root: &SyntaxNode) -> Self
pub fn build(root: &SyntaxNode) -> Self
Build the model from a bib parse-tree root.
Sourcepub fn string_defs(&self) -> &[StringDef]
pub fn string_defs(&self) -> &[StringDef]
Every @string definition, in source order.
Sourcepub fn string_uses(&self) -> &[StringUse]
pub fn string_uses(&self) -> &[StringUse]
Every @string use, in source order.
Sourcepub fn duplicate_keys(&self) -> impl Iterator<Item = &Entry>
pub fn duplicate_keys(&self) -> impl Iterator<Item = &Entry>
Returns entries whose cite key duplicates an earlier entry in this file.
Sourcepub fn undefined_string_uses(&self) -> impl Iterator<Item = &StringUse>
pub fn undefined_string_uses(&self) -> impl Iterator<Item = &StringUse>
@string uses that match no in-file definition or predefined month macro.
A macro may still be defined in another bibliography file.
Sourcepub fn unused_string_defs(&self) -> impl Iterator<Item = &StringDef>
pub fn unused_string_defs(&self) -> impl Iterator<Item = &StringDef>
@string definitions never referenced by any use in this file.
A definition may still be used from another bibliography file. Names are compared in lowercase.
Trait Implementations§
impl Eq for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
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