pub struct CodeBlock<T = ()> {
pub kind: CodeBlockKind,
pub literal: String,
pub user_data: T,
}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.
user_data: TUser-defined data associated with this code block
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for CodeBlock<T>where
T: Deserialize<'de> + Default,
impl<'de, T> Deserialize<'de> for CodeBlock<T>where
T: Deserialize<'de> + Default,
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> StripData<T> for CodeBlock<T>
impl<T> StripData<T> for CodeBlock<T>
Source§type StrippedType = CodeBlock
type StrippedType = CodeBlock
The type without user data
Source§fn strip_data(self) -> Self::StrippedType
fn strip_data(self) -> Self::StrippedType
Remove user data from this AST node
impl<T> StructuralPartialEq for CodeBlock<T>
Auto Trait Implementations§
impl<T> Freeze for CodeBlock<T>where
T: Freeze,
impl<T> RefUnwindSafe for CodeBlock<T>where
T: RefUnwindSafe,
impl<T> Send for CodeBlock<T>where
T: Send,
impl<T> Sync for CodeBlock<T>where
T: Sync,
impl<T> Unpin for CodeBlock<T>where
T: Unpin,
impl<T> UnwindSafe for CodeBlock<T>where
T: UnwindSafe,
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