#[non_exhaustive]pub struct TocEntry<'a> {
pub id: &'a str,
pub title: Title<'a>,
pub level: u8,
pub xreflabel: Option<&'a str>,
pub numbered: bool,
pub style: Option<&'a str>,
}Expand description
A TocEntry represents a table of contents entry.
This is collected during parsing from Section.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: &'a strUnique identifier for this section (used for anchor links)
title: Title<'a>Title of the section
level: u8Section level (1 for top-level, 2 for subsection, etc.)
xreflabel: Option<&'a str>Optional cross-reference label (from [[id,xreflabel]] syntax)
numbered: boolWhether this section should be numbered when sectnums is enabled.
False for special section styles like [bibliography], [glossary], etc.
style: Option<&'a str>Optional style from block metadata (e.g., “appendix”, “bibliography”).
Trait Implementations§
impl<'a> StructuralPartialEq for TocEntry<'a>
Auto Trait Implementations§
impl<'a> Freeze for TocEntry<'a>
impl<'a> RefUnwindSafe for TocEntry<'a>
impl<'a> Send for TocEntry<'a>
impl<'a> Sync for TocEntry<'a>
impl<'a> Unpin for TocEntry<'a>
impl<'a> UnsafeUnpin for TocEntry<'a>
impl<'a> UnwindSafe for TocEntry<'a>
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