pub enum InlinePiece<'a> {
Text {
start: u32,
end: u32,
format: Option<&'a CharacterFormat>,
},
Image(&'a ImageAnchor),
FootnoteRef(&'a FootnoteRefAnchor),
}Expand description
One ordered piece of a block’s inline content: a run of text, or an image.
Produced by merge_runs_and_anchors and mapped by each caller into its own
output type.
Variants§
Text
Byte range [start, end) of the block’s plain_text. format is
None for bytes no format run covers.
Image(&'a ImageAnchor)
An image anchored at this position. Contributes one logical character and zero bytes.
FootnoteRef(&'a FootnoteRefAnchor)
A footnote reference anchored at this position. Contributes one logical character and zero bytes, exactly as an image does.
Trait Implementations§
Source§impl<'a> Clone for InlinePiece<'a>
impl<'a> Clone for InlinePiece<'a>
Source§fn clone(&self) -> InlinePiece<'a>
fn clone(&self) -> InlinePiece<'a>
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<'a> Debug for InlinePiece<'a>
impl<'a> Debug for InlinePiece<'a>
Source§impl<'a> PartialEq for InlinePiece<'a>
impl<'a> PartialEq for InlinePiece<'a>
impl<'a> StructuralPartialEq for InlinePiece<'a>
Auto Trait Implementations§
impl<'a> Freeze for InlinePiece<'a>
impl<'a> RefUnwindSafe for InlinePiece<'a>
impl<'a> Send for InlinePiece<'a>
impl<'a> Sync for InlinePiece<'a>
impl<'a> Unpin for InlinePiece<'a>
impl<'a> UnsafeUnpin for InlinePiece<'a>
impl<'a> UnwindSafe for InlinePiece<'a>
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