pub struct LineInfo {Show 14 fields
pub byte_offset: usize,
pub byte_len: usize,
pub indent: usize,
pub is_blank: bool,
pub in_code_block: bool,
pub in_front_matter: bool,
pub in_html_block: bool,
pub in_html_comment: bool,
pub list_item: Option<ListItemInfo>,
pub heading: Option<HeadingInfo>,
pub blockquote: Option<BlockquoteInfo>,
pub in_mkdocstrings: bool,
pub in_esm_block: bool,
pub in_code_span_continuation: bool,
}Expand description
Pre-computed information about a line
Fields§
§byte_offset: usizeByte offset where this line starts in the document
byte_len: usizeLength of the line in bytes (without newline)
indent: usizeNumber of leading spaces/tabs
is_blank: boolWhether the line is blank (empty or only whitespace)
in_code_block: boolWhether this line is inside a code block
in_front_matter: boolWhether this line is inside front matter
in_html_block: boolWhether this line is inside an HTML block
in_html_comment: boolWhether this line is inside an HTML comment
list_item: Option<ListItemInfo>List item information if this line starts a list item
heading: Option<HeadingInfo>Heading information if this line is a heading
blockquote: Option<BlockquoteInfo>Blockquote information if this line is a blockquote
in_mkdocstrings: boolWhether this line is inside a mkdocstrings autodoc block
in_esm_block: boolWhether this line is part of an ESM import/export block (MDX only)
in_code_span_continuation: boolWhether this line is a continuation of a multi-line code span from a previous line
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LineInfo
impl RefUnwindSafe for LineInfo
impl Send for LineInfo
impl Sync for LineInfo
impl Unpin for LineInfo
impl UnwindSafe for LineInfo
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more