pub enum Inline<'src> {
Text(&'src str),
Bold(InlineSpan),
Italic(InlineSpan),
Link {
text: InlineSpan,
url: &'src str,
title: Option<&'src str>,
},
Image {
alt: &'src str,
url: &'src str,
title: Option<&'src str>,
},
Code(&'src str),
SoftBreak,
HardBreak,
}Expand description
An inline element within a Markdown block.
Variants§
Implementations§
Source§impl<'src> Inline<'src>
impl<'src> Inline<'src>
Sourcepub fn parse(input: &'src str, pool: &mut Vec<Self>) -> InlineSpan
pub fn parse(input: &'src str, pool: &mut Vec<Self>) -> InlineSpan
Parse inline elements and store them in the pool. Returns a span.
Uses default limits (MAX_INLINE_DEPTH = 16, INLINE_STACK_CAP = 32).
For custom limits, use crate::MarkdownFile::parse with const generics.
Sourcepub fn parse_flat_into(input: &'src str, pool: &mut Vec<Self>)
pub fn parse_flat_into(input: &'src str, pool: &mut Vec<Self>)
Push parsed inline elements directly into the pool without wrapping in a span. Used for blockquote multi-line accumulation where the caller manages span boundaries.
Uses default limits (MAX_INLINE_DEPTH = 16, INLINE_STACK_CAP = 32).
For custom limits, use crate::MarkdownFile::parse with const generics.
Trait Implementations§
impl<'src> Copy for Inline<'src>
impl<'src> Eq for Inline<'src>
impl<'src> StructuralPartialEq for Inline<'src>
Auto Trait Implementations§
impl<'src> Freeze for Inline<'src>
impl<'src> RefUnwindSafe for Inline<'src>
impl<'src> Send for Inline<'src>
impl<'src> Sync for Inline<'src>
impl<'src> Unpin for Inline<'src>
impl<'src> UnsafeUnpin for Inline<'src>
impl<'src> UnwindSafe for Inline<'src>
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