#[non_exhaustive]pub struct NUpOptions {
pub sheet: (f32, f32),
pub grid: (u32, u32),
}Expand description
How an N-up imposition behaves.
#[non_exhaustive]; build one with NUpOptions::builder, whose
.sheet takes a kurbo::Size and whose .grid takes columns and rows
as two arguments — the bare tuples below are unlabelled, and a caller who
swaps them gets a rotated sheet or a transposed grid with no complaint.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sheet: (f32, f32)The sheet’s size in points, as (width, height).
grid: (u32, u32)Sub-pages per sheet, as (columns, rows).
Implementations§
Source§impl NUpOptions
impl NUpOptions
Sourcepub fn builder() -> NUpOptionsBuilder
pub fn builder() -> NUpOptionsBuilder
A builder over the defaults: US Letter, two across and one down.
use kurbo::Size;
use pdfrum_edit::NUpOptions;
// A4 landscape, four up in a 2x2 grid.
let options = NUpOptions::builder()
.sheet(Size::new(842.0, 595.0))
.grid(2, 2)
.build();
assert_eq!(options.grid, (2, 2));Trait Implementations§
Source§impl Clone for NUpOptions
impl Clone for NUpOptions
impl Copy for NUpOptions
Source§impl Debug for NUpOptions
impl Debug for NUpOptions
Source§impl Default for NUpOptions
impl Default for NUpOptions
Source§impl PartialEq for NUpOptions
impl PartialEq for NUpOptions
impl StructuralPartialEq for NUpOptions
Auto Trait Implementations§
impl Freeze for NUpOptions
impl RefUnwindSafe for NUpOptions
impl Send for NUpOptions
impl Sync for NUpOptions
impl Unpin for NUpOptions
impl UnsafeUnpin for NUpOptions
impl UnwindSafe for NUpOptions
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.