pub struct IndexEntry {
pub link_text: String,
pub dest: String,
pub description: String,
pub separator: Option<char>,
pub text_span: Range<usize>,
pub tail_span: Range<usize>,
pub line_span: Range<usize>,
}Expand description
One list entry of an index: a list item that starts with a link.
Fields§
§link_text: StringSource text of the link text (between [ and the matching ]).
dest: StringLink destination as interpreted by pulldown-cmark (without <...> and
the title attribute). Used for comparison and resolution only; never
written back.
description: StringSummary with the separator and surrounding whitespace removed.
separator: Option<char>One of - – — :, if present.
text_span: Range<usize>From just after [ to just before the matching ].
tail_span: Range<usize>From the end of the link to the end of the inline content (separator + summary, may span lines).
line_span: Range<usize>From the start of the line containing text_span.start through the line
terminator (\n or \r\n) after tail_span.end.
Trait Implementations§
Source§impl Clone for IndexEntry
impl Clone for IndexEntry
Source§impl Debug for IndexEntry
impl Debug for IndexEntry
impl Eq for IndexEntry
Source§impl PartialEq for IndexEntry
impl PartialEq for IndexEntry
impl StructuralPartialEq for IndexEntry
Auto Trait Implementations§
impl Freeze for IndexEntry
impl RefUnwindSafe for IndexEntry
impl Send for IndexEntry
impl Sync for IndexEntry
impl Unpin for IndexEntry
impl UnsafeUnpin for IndexEntry
impl UnwindSafe for IndexEntry
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§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.