pub struct InlineSource {
pub text: String,
/* private fields */
}Expand description
The inline content the parser read for one paragraph or heading, from
Document::inline_source, with where each of its offsets sits in the
document’s source.
Fields§
§text: StringThe text the inline pass read: container markers, indentation, and an
ATX heading’s opening and closing sequences removed, and lines joined
with \n.
Implementations§
Source§impl InlineSource
impl InlineSource
Sourcepub fn to_source(&self, offset: usize) -> usize
pub fn to_source(&self, offset: usize) -> usize
The source offset of text[offset..]; offset == text.len() maps to
the end of the leaf’s content.
Sourcepub fn span_to_source(&self, span: Span) -> Span
pub fn span_to_source(&self, span: Span) -> Span
The source span of span, a span in text, as the parser maps the
spans of the inlines it reads from text.
Trait Implementations§
Source§impl Clone for InlineSource
impl Clone for InlineSource
Auto Trait Implementations§
impl Freeze for InlineSource
impl RefUnwindSafe for InlineSource
impl Send for InlineSource
impl Sync for InlineSource
impl Unpin for InlineSource
impl UnsafeUnpin for InlineSource
impl UnwindSafe for InlineSource
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