pub struct Section { /* private fields */ }Expand description
One heading and everything beneath it.
A section carries a handle to its document’s source, so body() and
content() work wherever the section travels.
Implementations§
Source§impl Section
impl Section
Sourcepub fn level(&self) -> HeadingLevel
pub fn level(&self) -> HeadingLevel
The heading depth.
Sourcepub fn span(&self) -> Range<usize> ⓘ
pub fn span(&self) -> Range<usize> ⓘ
Byte range of the whole section within the document source.
Sourcepub fn content(&self) -> &str
pub fn content(&self) -> &str
Heading, prose, and every subsection — the slice to hand a model when it needs one part of a long skill.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnsafeUnpin for Section
impl UnwindSafe for Section
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.