pub struct FootnoteMap { /* private fields */ }Expand description
The set of parsed footnote definition labels, stored in the root node.
Implementations§
Source§impl FootnoteMap
impl FootnoteMap
Sourcepub fn add_def(&mut self, label: &str) -> Option<usize>
pub fn add_def(&mut self, label: &str) -> Option<usize>
Create an ID for the definition, or return None if a definition already exists for the label
Sourcepub fn add_ref(&mut self, label: &str) -> Option<(usize, usize)>
pub fn add_ref(&mut self, label: &str) -> Option<(usize, usize)>
Create an ID for the reference and return (def_id, ref_id), or return None if no definition exists for the label
Sourcepub fn add_inline_def(&mut self) -> (usize, usize)
pub fn add_inline_def(&mut self) -> (usize, usize)
Add an inline definition and return (def_id, ref_id)
Sourcepub fn referenced_by(&self, def_id: usize) -> Vec<usize>
pub fn referenced_by(&self, def_id: usize) -> Vec<usize>
return the IDs of all references to the given definition ID
Trait Implementations§
Source§impl Debug for FootnoteMap
impl Debug for FootnoteMap
Source§impl Default for FootnoteMap
impl Default for FootnoteMap
Source§fn default() -> FootnoteMap
fn default() -> FootnoteMap
Returns the “default value” for a type. Read more
impl RootExt for FootnoteMap
Auto Trait Implementations§
impl Freeze for FootnoteMap
impl RefUnwindSafe for FootnoteMap
impl Send for FootnoteMap
impl Sync for FootnoteMap
impl Unpin for FootnoteMap
impl UnwindSafe for FootnoteMap
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.