pub struct CodeBlock {
pub code: String,
pub language: String,
pub span: Span,
pub code_offset: usize,
pub code_start_line: usize,
}Expand description
A code block extracted from a Markdown file
Fields§
§code: StringThe raw source code inside the fenced block
language: StringLanguage tag (should be “lumen”)
span: SpanSpan covering the entire fenced block in the original file
code_offset: usizeByte offset where the code content starts (after the opening fence)
code_start_line: usizeLine number where the code content starts (1-based)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeBlock
impl RefUnwindSafe for CodeBlock
impl Send for CodeBlock
impl Sync for CodeBlock
impl Unpin for CodeBlock
impl UnwindSafe for CodeBlock
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