pub struct OutlineEntry {
pub level: u8,
pub title: String,
pub page_index: usize,
pub top_from_top_pt: f32,
}Expand description
One PDF bookmark/outline entry captured during layout. Ordered in
document order; nesting is reconstructed from level at emit time.
Fields§
§level: u8Heading level 1..=3 (clamped, mirrors read_level).
title: StringBookmark title: section number (if any) + heading text, e.g. “1.2 Introduction”.
page_index: usize0-based index into PageGraph::pages of the page the heading’s
first line lands on. Always in range by construction.
top_from_top_pt: f32Y of the heading’s glyph tops, measured from the page top in pt.
The PDF backend flips once: top = page.height_pt - top_from_top_pt
(same convention as TextRun::baseline_from_top_pt).
Trait Implementations§
Source§impl Clone for OutlineEntry
impl Clone for OutlineEntry
Source§fn clone(&self) -> OutlineEntry
fn clone(&self) -> OutlineEntry
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 OutlineEntry
impl RefUnwindSafe for OutlineEntry
impl Send for OutlineEntry
impl Sync for OutlineEntry
impl Unpin for OutlineEntry
impl UnsafeUnpin for OutlineEntry
impl UnwindSafe for OutlineEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.