pub struct Catalog { /* private fields */ }Expand description
Document catalog for tracking referenceable elements.
The catalog maintains a registry of all elements that can be referenced via cross-references, including anchors, sections, and bibliography entries. It provides functionality for registering new references, resolving reference text to IDs, and detecting duplicate IDs.
Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn get_ref(&self, id: &str) -> Option<&RefEntry>
pub fn get_ref(&self, id: &str) -> Option<&RefEntry>
Returns a reference entry by ID, if it exists.
Sourcepub fn contains_id(&self, id: &str) -> bool
pub fn contains_id(&self, id: &str) -> bool
Returns true if an ID is already registered in the catalog.
Sourcepub fn resolve_id(&self, reftext: &str) -> Option<String>
pub fn resolve_id(&self, reftext: &str) -> Option<String>
Resolve reference text to an ID, if possible.
Trait Implementations§
impl Eq for Catalog
impl StructuralPartialEq for Catalog
Auto Trait Implementations§
impl Freeze for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnwindSafe for Catalog
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