pub struct TableOfContents {
pub min_depth: u8,
pub max_depth: u8,
pub auto_insert: bool,
}Expand description
Generates a table of contents from document headings and inserts it
as a <TableOfContents> component node.
The TOC is inserted at the position of an existing <TableOfContents />
placeholder component, or prepended after frontmatter if no placeholder exists
and auto_insert is true.
§Configuration
min_depth/max_depth: heading levels to include (default: 2..=3)auto_insert: whether to insert TOC when no placeholder exists (default: false)
Fields§
§min_depth: u8§max_depth: u8§auto_insert: boolTrait Implementations§
Source§impl Default for TableOfContents
impl Default for TableOfContents
Source§impl Transform for TableOfContents
impl Transform for TableOfContents
Auto Trait Implementations§
impl Freeze for TableOfContents
impl RefUnwindSafe for TableOfContents
impl Send for TableOfContents
impl Sync for TableOfContents
impl Unpin for TableOfContents
impl UnsafeUnpin for TableOfContents
impl UnwindSafe for TableOfContents
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