pub struct Structure { /* private fields */ }
Implementations§
Source§impl Structure
impl Structure
pub fn new(elements: Vec<ElementWithLoc>) -> Self
pub fn elements(&self) -> Vec<ElementID>
pub fn elements_with_loc(&self) -> Vec<(ElementID, &ElementWithLoc)>
pub fn elements_with_ids<'a, 'b: 'a>( &'a self, ids: &'b [ElementID], ) -> impl Iterator<Item = &'a ElementWithLoc>
pub fn headings(&self) -> Vec<HeadingID>
pub fn element_by_id(&self, id: ElementID) -> &ElementWithLoc
pub fn heading_by_id(&self, id: HeadingID) -> (&Heading, Range<Pos>)
pub fn headings_with_ids( &self, ids: &[HeadingID], ) -> Vec<(&Heading, Range<Pos>)>
pub fn refs(&self) -> Vec<LinkRefID>
pub fn ref_by_id(&self, id: LinkRefID) -> (&LinkRef, Range<Pos>)
pub fn refs_with_ids(&self, ids: &[LinkRefID]) -> Vec<(&LinkRef, Range<Pos>)>
Trait Implementations§
impl Eq for Structure
impl StructuralPartialEq for Structure
Auto Trait Implementations§
impl Freeze for Structure
impl RefUnwindSafe for Structure
impl Send for Structure
impl Sync for Structure
impl Unpin for Structure
impl UnwindSafe for Structure
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.