pub struct TocBlock<'src> { /* private fields */ }Expand description
A TOC block represents the toc::[] block macro, which marks the position
where a table of contents should be rendered when toc-placement is set to
macro.
The macro carries no target; its optional attribute list can override the
per-macro settings Asciidoctor honors on the generated TOC (id, levels,
and role), while a block title above the macro overrides toc-title.
Implementations§
Source§impl<'src> TocBlock<'src>
impl<'src> TocBlock<'src>
Sourcepub fn child_blocks(&'src self) -> ChildBlocks<'src> ⓘ
pub fn child_blocks(&'src self) -> ChildBlocks<'src> ⓘ
Returns a document-order iterator over this block’s direct child blocks.
A TOC block never has child blocks, so this iterator is always empty.
See FindBlocks to search from a
Block or Document.
Sourcepub fn macro_attrlist(&'src self) -> &'src Attrlist<'src>
pub fn macro_attrlist(&'src self) -> &'src Attrlist<'src>
Return the macro’s attribute list.
IMPORTANT: This is the list of attributes within the macro block
definition itself (e.g. toc::[levels=2]), which Asciidoctor uses to
override the per-macro TOC settings (id, levels, and role).
See also attrlist() for attributes that can be defined before the
macro invocation.
Trait Implementations§
impl<'src> Eq for TocBlock<'src>
Source§impl<'src> IsBlock<'src> for TocBlock<'src>
impl<'src> IsBlock<'src> for TocBlock<'src>
Source§fn content_model(&self) -> ContentModel
fn content_model(&self) -> ContentModel
ContentModel for this block.Source§fn raw_context(&self) -> CowStr<'src>
fn raw_context(&self) -> CowStr<'src>
Source§fn title_source(&'src self) -> Option<Span<'src>>
fn title_source(&'src self) -> Option<Span<'src>>
Source§fn anchor_reftext(&'src self) -> Option<Span<'src>>
fn anchor_reftext(&'src self) -> Option<Span<'src>>
Source§fn attrlist(&'src self) -> Option<&'src Attrlist<'src>>
fn attrlist(&'src self) -> Option<&'src Attrlist<'src>>
Source§fn rendered_content(&'src self) -> Option<&'src str>
fn rendered_content(&'src self) -> Option<&'src str>
Source§fn resolved_context(&'src self) -> CowStr<'src>
fn resolved_context(&'src self) -> CowStr<'src>
Source§fn declared_style(&'src self) -> Option<&'src str>
fn declared_style(&'src self) -> Option<&'src str>
Source§fn child_blocks_mut(&mut self) -> &mut [Block<'src>]
fn child_blocks_mut(&mut self) -> &mut [Block<'src>]
Source§fn content_mut(&mut self) -> Option<&mut Content<'src>>
fn content_mut(&mut self) -> Option<&mut Content<'src>>
Source§fn options(&'src self) -> Vec<&'src str>
fn options(&'src self) -> Vec<&'src str>
Source§fn has_option<N: AsRef<str>>(&'src self, name: N) -> bool
fn has_option<N: AsRef<str>>(&'src self, name: N) -> bool
true if this block has the named option. Read more