pub struct CodeBlock {
pub kind: CodeBlockKind,
pub literal: String,
}Expand description
Fenced or indented code block.
Fields§
§kind: CodeBlockKindDistinguishes indented vs fenced code and stores the info string.
literal: StringLiteral text inside the code block without final newline trimming.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodeBlock
impl<'de> Deserialize<'de> for CodeBlock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Default> WithData<T> for CodeBlock
impl<T: Default> WithData<T> for CodeBlock
Source§type WithDataType = CodeBlock<T>
type WithDataType = CodeBlock<T>
The type with user data attached
Source§fn with_data(self, data: T) -> Self::WithDataType
fn with_data(self, data: T) -> Self::WithDataType
Add user data to this AST node
Source§fn with_default_data(self) -> Self::WithDataTypewhere
T: Default,
fn with_default_data(self) -> Self::WithDataTypewhere
T: Default,
Add default user data to this AST node
impl StructuralPartialEq for CodeBlock
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