pub struct BodySpans {
pub code: Vec<Range<usize>>,
pub links: Vec<Range<usize>>,
}Expand description
What one parse of a body yields for a link scan: the spans twig reads as code, and the spans it reads as inline links, each sorted by start offset.
A named pair rather than a bare tuple because the two lists are the same shape, and telling them apart at a call site should not depend on getting their order right.
Fields§
§code: Vec<Range<usize>>Everything a link scan must treat as opaque — see code_spans.
links: Vec<Range<usize>>Each inline [label](target) construct — see link_spans.
Trait Implementations§
impl Eq for BodySpans
impl StructuralPartialEq for BodySpans
Auto Trait Implementations§
impl Freeze for BodySpans
impl RefUnwindSafe for BodySpans
impl Send for BodySpans
impl Sync for BodySpans
impl Unpin for BodySpans
impl UnsafeUnpin for BodySpans
impl UnwindSafe for BodySpans
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.