pub struct SectionSpan {
pub section: Section,
pub start: usize,
pub end: usize,
}Expand description
One extracted section plus its verbatim line span: [start, end) as
0-based indices into body.split_inclusive('\n') — exactly the slice the
section’s body field was concatenated from. The span is what the
section editors (dbmd section set / append) splice against, so the
read views (sections, outline) and the write path share one boundary
rule (including the H1 terminator, which ends a span without ever being a
section itself).
Fields§
§section: SectionThe extracted section.
start: usizeFirst line of the span — the heading line — 0-based.
end: usizeOne past the last line of the span, 0-based.
Trait Implementations§
Source§impl Clone for SectionSpan
impl Clone for SectionSpan
Source§fn clone(&self) -> SectionSpan
fn clone(&self) -> SectionSpan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SectionSpan
impl Debug for SectionSpan
impl Eq for SectionSpan
Source§impl PartialEq for SectionSpan
impl PartialEq for SectionSpan
impl StructuralPartialEq for SectionSpan
Auto Trait Implementations§
impl Freeze for SectionSpan
impl RefUnwindSafe for SectionSpan
impl Send for SectionSpan
impl Sync for SectionSpan
impl Unpin for SectionSpan
impl UnsafeUnpin for SectionSpan
impl UnwindSafe for SectionSpan
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.