pub struct ParsedSpan {
pub text: String,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub strikeout: bool,
pub code: bool,
pub superscript: bool,
pub subscript: bool,
pub link_href: Option<String>,
pub image: Option<ParsedImage>,
pub footnote_ref: Option<String>,
}Expand description
A parsed inline span with formatting info.
A span carries either text or an image, never both: an image span’s text
is empty and its description lives in ParsedImage::alt, so alt text
cannot leak into the block’s prose (and therefore cannot be counted as
manuscript words or matched by a search).
Fields§
§text: String§bold: bool§italic: bool§underline: bool§strikeout: bool§code: bool§superscript: boolSuperscript (djot ^x^). Maps to CharVerticalAlignment::SuperScript.
subscript: boolSubscript (djot ~x~). Maps to CharVerticalAlignment::SubScript.
link_href: Option<String>§image: Option<ParsedImage>Set when this span is an inline image rather than text.
footnote_ref: Option<String>Set when this span is a footnote reference rather than text — the label naming the note, never the number a reader sees.
Trait Implementations§
Source§impl Clone for ParsedSpan
impl Clone for ParsedSpan
Source§impl Debug for ParsedSpan
impl Debug for ParsedSpan
Auto Trait Implementations§
impl Freeze for ParsedSpan
impl RefUnwindSafe for ParsedSpan
impl Send for ParsedSpan
impl Sync for ParsedSpan
impl Unpin for ParsedSpan
impl UnsafeUnpin for ParsedSpan
impl UnwindSafe for ParsedSpan
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