pub struct ExtractToc {
pub skip: Vec<String>,
pub skip_inside: Vec<String>,
pub min_depth: Option<u8>,
pub max_depth: Option<u8>,
}Expand description
html.extractToc: the headings, nested by rank, as the file’s data.toc, as
@stefanprobst/rehype-extract-toc stores them.
Fields§
§skip: Vec<String>Attributes, such as data-toc-hidden, that keep a heading out of the table of
contents, or name=value, such as data-toc=false, for one value of it; what would
nest under it nests under the heading before.
skip_inside: Vec<String>Elements, by tag name, whose headings stay out, such as a card’s title.
min_depth: Option<u8>The shallowest heading rank listed, 1 to 6.
max_depth: Option<u8>The deepest heading rank listed, 1 to 6.
Trait Implementations§
Source§impl Clone for ExtractToc
impl Clone for ExtractToc
Source§impl Debug for ExtractToc
impl Debug for ExtractToc
Source§impl Default for ExtractToc
impl Default for ExtractToc
Source§impl<'de> Deserialize<'de> for ExtractTocwhere
ExtractToc: Default,
impl<'de> Deserialize<'de> for ExtractTocwhere
ExtractToc: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Transform for ExtractToc
impl Transform for ExtractToc
fn input(&self) -> TreeKind
fn output(&self) -> TreeKind
fn run<'a>( &self, tree: Tree<'a>, file: &mut File, _alloc: &'a Allocator, ) -> Result<Tree<'a>, Error>
Source§fn start<'a>(
&self,
tree: Tree<'a>,
file: &mut File,
alloc: &'a Bump,
) -> Result<Step<'a>, Error>
fn start<'a>( &self, tree: Tree<'a>, file: &mut File, alloc: &'a Bump, ) -> Result<Step<'a>, Error>
Start the stage: a finished tree, or a job when its work is asynchronous.
Source§fn host(&self) -> Option<u32>
fn host(&self) -> Option<u32>
The id of the binding function this stage stands for, which takes and returns
whatever tree reaches it;
None for a stage the crate runs.Source§fn html_writer(&self, _target: HtmlTarget) -> Option<Box<dyn HtmlWriter>>
fn html_writer(&self, _target: HtmlTarget) -> Option<Box<dyn HtmlWriter>>
Something that writes, from this stage’s input, the HTML a compiler aiming at
target would write from its output, when the stage can skip building that tree.Auto Trait Implementations§
impl Freeze for ExtractToc
impl RefUnwindSafe for ExtractToc
impl Send for ExtractToc
impl Sync for ExtractToc
impl Unpin for ExtractToc
impl UnsafeUnpin for ExtractToc
impl UnwindSafe for ExtractToc
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