pub struct MarkdownNode { /* private fields */ }Expand description
A custom Markdown node produced by MarkdownExtensions.
Implementations§
Source§impl MarkdownNode
impl MarkdownNode
Sourcepub fn new<T>(name: impl Into<SharedString>, data: T) -> Self
pub fn new<T>(name: impl Into<SharedString>, data: T) -> Self
Create a custom Markdown node with a stable name and typed data.
Sourcepub fn as_markdown(&self) -> &str
pub fn as_markdown(&self) -> &str
Markdown representation of this custom node.
Sourcepub fn text(self, text: impl Into<SharedString>) -> Self
pub fn text(self, text: impl Into<SharedString>) -> Self
Set the text representation of this custom node.
Sourcepub fn markdown(self, markdown: impl Into<SharedString>) -> Self
pub fn markdown(self, markdown: impl Into<SharedString>) -> Self
Set the Markdown representation of this custom node.
Trait Implementations§
Source§impl Clone for MarkdownNode
impl Clone for MarkdownNode
Source§fn clone(&self) -> MarkdownNode
fn clone(&self) -> MarkdownNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MarkdownNode
impl Debug for MarkdownNode
Auto Trait Implementations§
impl !RefUnwindSafe for MarkdownNode
impl !UnwindSafe for MarkdownNode
impl Freeze for MarkdownNode
impl Send for MarkdownNode
impl Sync for MarkdownNode
impl Unpin for MarkdownNode
impl UnsafeUnpin for MarkdownNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more