pub struct CodeBlock {
pub bytes: Range<usize>,
pub fenced: bool,
}Expand description
A code block of a body, at any depth of quotes, lists, and footnotes.
Fields§
§bytes: Range<usize>The bytes of the block’s lines in the body as written: from the
start of its first line, which holds the opening fence of a fenced
block, to the end of its last line, which holds the closing fence
where the block has one, before that line’s ending. The range holds
no blank line after the block’s last line. The offsets count from the start of the text that
markdown::parse takes, before it blanks a region or the trailer or
removes an anchor; Document::parse gives it the body after the
frontmatter, with CRLF and a carriage return alone read as LF. A
line ends at a line feed, at a carriage return and a line feed, or at
a carriage return alone.
fenced: boolWhether the block is fenced; an indented block is not.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodeBlock
impl<'de> Deserialize<'de> for CodeBlock
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodeBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodeBlock, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for CodeBlock
Source§impl Serialize for CodeBlock
impl Serialize for CodeBlock
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CodeBlock
Auto Trait Implementations§
impl Forget for CodeBlock
impl Freeze for CodeBlock
impl Move for CodeBlock
impl RefUnwindSafe for CodeBlock
impl Send for CodeBlock
impl Sync for CodeBlock
impl Unpin for CodeBlock
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.