pub struct SectionBlock<'src> { /* private fields */ }Expand description
Sections partition the document into a content hierarchy. A section is an implicit enclosure. Each section begins with a title and ends at the next sibling section, ancestor section, or end of document. Nested section levels must be sequential.
WARNING: This is a very preliminary implementation. There are many TO DO items in this code.
Implementations§
Source§impl<'src> SectionBlock<'src>
impl<'src> SectionBlock<'src>
Sourcepub fn level(&self) -> usize
pub fn level(&self) -> usize
Return the section’s level.
The section title must be prefixed with a section marker, which indicates the section level. The number of equal signs in the marker represents the section level using a 0-based index (e.g., two equal signs represents level 1). A section marker can range from two to six equal signs and must be followed by a space.
This function will return an integer between 1 and 5.
Trait Implementations§
Source§impl<'src> Clone for SectionBlock<'src>
impl<'src> Clone for SectionBlock<'src>
Source§fn clone(&self) -> SectionBlock<'src>
fn clone(&self) -> SectionBlock<'src>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'src> Debug for SectionBlock<'src>
impl<'src> Debug for SectionBlock<'src>
Source§impl<'src> HasSpan<'src> for SectionBlock<'src>
impl<'src> HasSpan<'src> for SectionBlock<'src>
Source§impl<'src> IsBlock<'src> for SectionBlock<'src>
impl<'src> IsBlock<'src> for SectionBlock<'src>
Source§fn content_model(&self) -> ContentModel
fn content_model(&self) -> ContentModel
Returns the ContentModel for this block.
Source§impl<'src> PartialEq for SectionBlock<'src>
impl<'src> PartialEq for SectionBlock<'src>
impl<'src> Eq for SectionBlock<'src>
impl<'src> StructuralPartialEq for SectionBlock<'src>
Auto Trait Implementations§
impl<'src> Freeze for SectionBlock<'src>
impl<'src> RefUnwindSafe for SectionBlock<'src>
impl<'src> Send for SectionBlock<'src>
impl<'src> Sync for SectionBlock<'src>
impl<'src> Unpin for SectionBlock<'src>
impl<'src> UnwindSafe for SectionBlock<'src>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)