pub enum BlockAnchor<'a> {
Image(&'a ImageAnchor),
FootnoteRef(&'a FootnoteRefAnchor),
}Expand description
One inline object anchored in a block: an image, or a footnote reference.
Both occupy a single U+FFFC and are woven into the text by the same rules,
so the weave takes them as one byte-ordered sequence rather than walking two
lists and hoping they interleave. They are stored apart because they are
edited apart, and are brought together only here.
Variants§
Image(&'a ImageAnchor)
FootnoteRef(&'a FootnoteRefAnchor)
Implementations§
Source§impl BlockAnchor<'_>
impl BlockAnchor<'_>
Sourcepub fn byte_offset(&self) -> u32
pub fn byte_offset(&self) -> u32
Byte position of this anchor’s sentinel within the block’s text.
Trait Implementations§
Source§impl<'a> Clone for BlockAnchor<'a>
impl<'a> Clone for BlockAnchor<'a>
Source§fn clone(&self) -> BlockAnchor<'a>
fn clone(&self) -> BlockAnchor<'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 moreimpl<'a> Copy for BlockAnchor<'a>
Source§impl<'a> Debug for BlockAnchor<'a>
impl<'a> Debug for BlockAnchor<'a>
impl<'a> Eq for BlockAnchor<'a>
Source§impl<'a> PartialEq for BlockAnchor<'a>
impl<'a> PartialEq for BlockAnchor<'a>
impl<'a> StructuralPartialEq for BlockAnchor<'a>
Auto Trait Implementations§
impl<'a> Freeze for BlockAnchor<'a>
impl<'a> RefUnwindSafe for BlockAnchor<'a>
impl<'a> Send for BlockAnchor<'a>
impl<'a> Sync for BlockAnchor<'a>
impl<'a> Unpin for BlockAnchor<'a>
impl<'a> UnsafeUnpin for BlockAnchor<'a>
impl<'a> UnwindSafe for BlockAnchor<'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