#[non_exhaustive]pub enum ViewSpec {
Xyz {
x: Option<f64>,
y: Option<f64>,
zoom: Option<f64>,
},
Fit,
FitH {
y: Option<f64>,
},
FitV {
x: Option<f64>,
},
FitR {
left: f64,
bottom: f64,
right: f64,
top: f64,
},
FitB,
FitBH {
y: Option<f64>,
},
FitBV {
x: Option<f64>,
},
}Expand description
PDF view spec from a destination array.
Each variant maps to one of the explicit-destination forms in ISO 32000-2 §12.3.2.2.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Xyz
[page /XYZ left top zoom] — position the upper-left corner of
the page region at (left, top) and zoom to zoom (1.0 = 100%).
None for a coordinate or zoom means “retain the current value”.
Fit
[page /Fit] — fit the entire page in the window.
FitH
[page /FitH top] — fit the page width with the top edge at top.
FitV
[page /FitV left] — fit the page height with left edge at left.
FitR
[page /FitR left bottom right top] — fit the rectangle in the window.
FitB
[page /FitB] — fit the page’s bounding box in the window.
FitBH
[page /FitBH top] — fit the bounding-box width.
FitBV
[page /FitBV left] — fit the bounding-box height.
Trait Implementations§
impl Copy for ViewSpec
impl StructuralPartialEq for ViewSpec
Auto Trait Implementations§
impl Freeze for ViewSpec
impl RefUnwindSafe for ViewSpec
impl Send for ViewSpec
impl Sync for ViewSpec
impl Unpin for ViewSpec
impl UnsafeUnpin for ViewSpec
impl UnwindSafe for ViewSpec
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<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> ⓘ
Converts
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> ⓘ
Converts
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