pub struct PrintOptions {
pub copies: u32,
pub pages: Vec<(u32, u32)>,
pub paper: Paper,
pub orientation: Orientation,
pub margins: Margins,
pub scale: f32,
pub color: bool,
pub sides: Sides,
pub backgrounds: bool,
}Expand description
What the user chose in a print dialog.
Fields§
§copies: u32§pages: Vec<(u32, u32)>Inclusive, from 1, in the user’s order; empty for every page. An open end is u32::MAX.
paper: Paper§orientation: Orientation§margins: Margins§scale: f32§color: bool§sides: Sides§backgrounds: boolImplementations§
Source§impl PrintOptions
impl PrintOptions
pub const MIN_SCALE: f32 = 0.100000001f32
pub const MAX_SCALE: f32 = 2f32
pub const MAX_COPIES: u32 = 99u32
Sourcepub fn paper_size(&self) -> (f32, f32)
pub fn paper_size(&self) -> (f32, f32)
The sheet as it is printed, turned for landscape.
Sourcepub fn margin_points(&self) -> [f32; 4]
pub fn margin_points(&self) -> [f32; 4]
Top, right, bottom and left, in points.
Sourcepub fn same_layout(&self, other: &PrintOptions) -> bool
pub fn same_layout(&self, other: &PrintOptions) -> bool
Whether other lays the document out the same way, so it has the same pages.
Trait Implementations§
Source§impl Clone for PrintOptions
impl Clone for PrintOptions
Source§fn clone(&self) -> PrintOptions
fn clone(&self) -> PrintOptions
Returns a copy 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 moreSource§impl Debug for PrintOptions
impl Debug for PrintOptions
Source§impl Default for PrintOptions
impl Default for PrintOptions
Source§impl PartialEq for PrintOptions
impl PartialEq for PrintOptions
impl StructuralPartialEq for PrintOptions
Auto Trait Implementations§
impl Freeze for PrintOptions
impl RefUnwindSafe for PrintOptions
impl Send for PrintOptions
impl Sync for PrintOptions
impl Unpin for PrintOptions
impl UnwindSafe for PrintOptions
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.