pub enum InlineNode {
Text(String),
Bold(String),
Italic(String),
Link {
text: String,
href: String,
},
Ref {
label: String,
note_id: String,
},
}Expand description
An inline content node within a paragraph.
Captures the inline structure of paragraph text so formatters can render bold, italic, link, and citation reference markup.
Variants§
Text(String)
Plain text.
Bold(String)
Bold text (<b> or <strong>).
Italic(String)
Italic text (<i> or <em>).
Link
A hyperlink (<a href="...">).
Ref
A citation reference (<sup class="mw-ref reference">).
label is the display number (e.g. "1"), note_id is the fragment
identifying the entry in the reference list (e.g. "cite_note-Foo-1").
Implementations§
Source§impl InlineNode
impl InlineNode
Sourcepub fn plain_text(&self) -> &str
pub fn plain_text(&self) -> &str
Returns the plain text content, stripping any markup.
Returns an empty string for Ref nodes — citations are not prose text.
Trait Implementations§
Source§impl Clone for InlineNode
impl Clone for InlineNode
Source§fn clone(&self) -> InlineNode
fn clone(&self) -> InlineNode
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for InlineNode
impl RefUnwindSafe for InlineNode
impl Send for InlineNode
impl Sync for InlineNode
impl Unpin for InlineNode
impl UnsafeUnpin for InlineNode
impl UnwindSafe for InlineNode
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