pub enum MdInlineElement {
Text {
content: String,
},
Bold {
content: Vec<MdInlineElement>,
},
Italic {
content: Vec<MdInlineElement>,
},
Link {
text: Vec<MdInlineElement>,
title: Option<String>,
url: String,
},
Image {
alt_text: String,
title: Option<String>,
url: String,
},
Code {
content: String,
},
Placeholder {
ch: char,
token_position: usize,
},
}
Expand description
Represents inline markdown elements (text, bold/italic, link, etc.)
Variants§
Text
Bold
Fields
§
content: Vec<MdInlineElement>
Italic
Fields
§
content: Vec<MdInlineElement>
Link
Image
Code
Placeholder
Implementations§
Source§impl MdInlineElement
impl MdInlineElement
Sourcepub fn to_plain_text(&self) -> String
pub fn to_plain_text(&self) -> String
Converts the inline element to a plain text representation.
Trait Implementations§
Source§impl Clone for MdInlineElement
impl Clone for MdInlineElement
Source§fn clone(&self) -> MdInlineElement
fn clone(&self) -> MdInlineElement
Returns a copy of the value. Read more
1.0.0 · 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 MdInlineElement
impl Debug for MdInlineElement
Source§impl From<String> for MdInlineElement
impl From<String> for MdInlineElement
Source§impl PartialEq for MdInlineElement
impl PartialEq for MdInlineElement
Source§impl ToHtml for MdInlineElement
impl ToHtml for MdInlineElement
impl StructuralPartialEq for MdInlineElement
Auto Trait Implementations§
impl Freeze for MdInlineElement
impl RefUnwindSafe for MdInlineElement
impl Send for MdInlineElement
impl Sync for MdInlineElement
impl Unpin for MdInlineElement
impl UnwindSafe for MdInlineElement
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