Struct comrak::nodes::NodeCodeBlock
source · pub struct NodeCodeBlock {
pub fenced: bool,
pub fence_char: u8,
pub fence_length: usize,
pub fence_offset: usize,
pub info: String,
pub literal: String,
}
Expand description
The metadata and data of a code block (fenced or indented).
Fields§
§fenced: bool
Whether the code block is fenced.
fence_char: u8
For fenced code blocks, the fence character itself (`
or ~
).
fence_length: usize
For fenced code blocks, the length of the fence.
fence_offset: usize
For fenced code blocks, the indentation level of the code within the block.
info: String
For fenced code blocks, the info string after the opening fence, if any.
literal: String
The literal contents of the code block. As the contents are not interpreted as Markdown at all, they are contained within this structure, rather than inserted into a child inline of any kind.
Trait Implementations§
source§impl Clone for NodeCodeBlock
impl Clone for NodeCodeBlock
source§fn clone(&self) -> NodeCodeBlock
fn clone(&self) -> NodeCodeBlock
Returns a copy of the value. Read more
1.0.0 · 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 NodeCodeBlock
impl Debug for NodeCodeBlock
source§impl Default for NodeCodeBlock
impl Default for NodeCodeBlock
source§fn default() -> NodeCodeBlock
fn default() -> NodeCodeBlock
Returns the “default value” for a type. Read more
source§impl PartialEq for NodeCodeBlock
impl PartialEq for NodeCodeBlock
source§fn eq(&self, other: &NodeCodeBlock) -> bool
fn eq(&self, other: &NodeCodeBlock) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for NodeCodeBlock
impl StructuralEq for NodeCodeBlock
impl StructuralPartialEq for NodeCodeBlock
Auto Trait Implementations§
impl RefUnwindSafe for NodeCodeBlock
impl Send for NodeCodeBlock
impl Sync for NodeCodeBlock
impl Unpin for NodeCodeBlock
impl UnwindSafe for NodeCodeBlock
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