Struct NodeCodeBlock
pub struct NodeCodeBlock { pub fenced: bool, pub fence_char: u8, pub fence_length: usize, pub fence_offset: usize, pub info: String, pub literal: String, pub closed: bool }
The metadata and data of a code block (fenced or indented).
Fields
fenced: boolWhether the code block is fenced.
fence_char: u8For fenced code blocks, the fence character itself (
`or~).fence_length: usizeFor fenced code blocks, the length of the fence.
fence_offset: usizeFor fenced code blocks, the indentation level of the code within the block.
info: StringFor fenced code blocks, the info string after the opening fence, if any.
literal: StringThe 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.
closed: boolWhether the code block was explicitly closed by a closing fence. This is only meaningful for fenced code blocks; indented code blocks are treated as closed (true).
Trait Implementations
impl Clone for NodeCodeBlock
fn clone(&self) -> NodeCodeBlock
impl Debug for NodeCodeBlock
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for NodeCodeBlock
fn default() -> NodeCodeBlock
impl Eq for NodeCodeBlock
impl PartialEq for NodeCodeBlock
fn eq(&self, other: &NodeCodeBlock) -> bool
impl StructuralPartialEq for NodeCodeBlock
Auto Trait Implementations
impl Freeze for NodeCodeBlock
impl RefUnwindSafe for NodeCodeBlock
impl Send for NodeCodeBlock
impl Sync for NodeCodeBlock
impl Unpin for NodeCodeBlock
impl UnsafeUnpin for NodeCodeBlock
impl UnwindSafe for NodeCodeBlock
Blanket Implementations
impl<T> Any for NodeCodeBlock
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for NodeCodeBlock
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for NodeCodeBlock
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for NodeCodeBlock
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for NodeCodeBlock
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for NodeCodeBlock
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for NodeCodeBlock
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for NodeCodeBlock
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for NodeCodeBlock
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>