pub struct BookmarkSpec {
pub title: String,
pub depth: usize,
pub target: BookmarkTarget,
pub color: Option<(f32, f32, f32)>,
pub style: Option<i64>,
pub open: bool,
}Expand description
One bookmark, as a caller describes it.
depth is what the reader’s Bookmark::depth
answers: zero is a top-level item, and an item deeper than the one before
it is that item’s child. A depth that jumps by more than one is clamped to
one deeper, since there is no honest tree that shape describes.
Fields§
§title: StringThe visible text, written as /Title.
depth: usizeHow deep the item sits; zero is top level.
target: BookmarkTargetWhere it points.
color: Option<(f32, f32, f32)>/C, the item’s colour as three components in [0, 1].
style: Option<i64>/F style bits: 1 italic, 2 bold.
open: boolWhether the item shows its children when the outline opens.
A closed item writes a negative /Count, which is how a reader tells
“collapsed” from “has no children”.
Implementations§
Trait Implementations§
Source§impl Clone for BookmarkSpec
impl Clone for BookmarkSpec
Source§impl Debug for BookmarkSpec
impl Debug for BookmarkSpec
Source§impl PartialEq for BookmarkSpec
impl PartialEq for BookmarkSpec
impl StructuralPartialEq for BookmarkSpec
Auto Trait Implementations§
impl Freeze for BookmarkSpec
impl RefUnwindSafe for BookmarkSpec
impl Send for BookmarkSpec
impl Sync for BookmarkSpec
impl Unpin for BookmarkSpec
impl UnsafeUnpin for BookmarkSpec
impl UnwindSafe for BookmarkSpec
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,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§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.