pub enum Destination {
Xyz {
page_index: Option<u32>,
left: Option<f32>,
top: Option<f32>,
zoom: Option<f32>,
},
Fit {
page_index: Option<u32>,
},
FitH {
page_index: Option<u32>,
top: Option<f32>,
},
FitV {
page_index: Option<u32>,
left: Option<f32>,
},
FitR {
page_index: Option<u32>,
left: f32,
bottom: f32,
right: f32,
top: f32,
},
FitB {
page_index: Option<u32>,
},
FitBH {
page_index: Option<u32>,
top: Option<f32>,
},
FitBV {
page_index: Option<u32>,
left: Option<f32>,
},
Named(String),
}Expand description
A PDF destination (ISO 32000-2 §12.3.2) — a target location and
viewport recipe used by GoTo / GoToR actions and by direct /Dest
link entries.
page_index is 0-based and may be None when the source PDF stored
the destination as an indirect-reference array the parser could not
resolve back to a page index. The remaining fields encode the
“where on the page and at what zoom” portion of the destination.
Variants§
Xyz
/XYZ left top zoom — go to a specific position with optional
zoom factor. None for any field means “preserve current
viewer setting”.
Fields
Fit
/Fit — fit the entire page into the viewer window.
FitH
/FitH top — fit page width; align so top is at the top of
the viewer.
Fields
FitV
/FitV left — fit page height; align so left is at the left
of the viewer.
Fields
FitR
/FitR left bottom right top — fit the given rectangle into
the viewer window.
Fields
FitB
/FitB — fit the page’s bounding box (the area containing
non-blank content) into the viewer.
FitBH
/FitBH top — fit the page bounding-box width; align so top
is at the top of the viewer.
Fields
FitBV
/FitBV left — fit the page bounding-box height; align so
left is at the left of the viewer.
Fields
Named(String)
A named destination — an indirection through the document’s
/Names tree. The string is the destination name; resolution
to a concrete location requires looking it up in the document
catalog’s /Names /Dests entry.
Trait Implementations§
Source§impl Clone for Destination
impl Clone for Destination
Source§fn clone(&self) -> Destination
fn clone(&self) -> Destination
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Destination
impl RefUnwindSafe for Destination
impl Send for Destination
impl Sync for Destination
impl Unpin for Destination
impl UnsafeUnpin for Destination
impl UnwindSafe for Destination
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more