pub struct Settings {Show 28 fields
pub orientation: Option<Orientation>,
pub paper_format: Option<String>,
pub paper_width: Option<String>,
pub paper_height: Option<String>,
pub n_copies: Option<String>,
pub default_source: Option<String>,
pub quality: Option<Quality>,
pub resolution: Option<String>,
pub use_color: Option<bool>,
pub duplex: Option<String>,
pub collate: Option<String>,
pub reverse: Option<String>,
pub media_type: Option<String>,
pub dither: Option<String>,
pub scale: Option<String>,
pub print_pages: Option<String>,
pub page_ranges: Option<String>,
pub page_set: Option<String>,
pub finishings: Option<String>,
pub number_up: Option<String>,
pub number_up_layout: Option<String>,
pub output_bin: Option<String>,
pub resolution_x: Option<String>,
pub resolution_y: Option<String>,
pub print_lpi: Option<String>,
pub output_basename: Option<String>,
pub output_file_format: Option<String>,
pub output_uri: Option<String>,
}Expand description
Print settings to set in the print dialog.
Fields
orientation: Option<Orientation>One of landscape, portrait, reverse_landscape or reverse_portrait.
paper_format: Option<String>A paper name according to PWG 5101.1-2002
paper_width: Option<String>Paper width, in millimeters.
paper_height: Option<String>Paper height, in millimeters.
n_copies: Option<String>The number of copies to print.
default_source: Option<String>The default paper source.
quality: Option<Quality>Print quality.
resolution: Option<String>The resolution, sets both resolution-x & resolution-y
use_color: Option<bool>Whether to use color.
duplex: Option<String>Duplex printing mode, one of simplex, horizontal or vertical.
collate: Option<String>Whether to collate copies.
reverse: Option<String>Whether to reverse the order of printed pages.
media_type: Option<String>A media type according to PWG 5101.1-2002
dither: Option<String>The dithering to use, one of fine, none, coarse, lineart, grayscale or error-diffusion.
scale: Option<String>The scale in percent
print_pages: Option<String>What pages to print, one of all, selection, current or ranges.
page_ranges: Option<String>A list of page ranges, formatted like this: 0-2,4,9-11.
page_set: Option<String>What pages to print, one of all, even or odd.
finishings: Option<String>The finishings.
number_up: Option<String>The number of pages per sheet.
number_up_layout: Option<String>One of lrtb, lrbt, rltb, rlbt, tblr, tbrl, btlr, btrl.
output_bin: Option<String>The output bin.
resolution_x: Option<String>The horizontal resolution in dpi.
resolution_y: Option<String>The vertical resolution in dpi.
print_lpi: Option<String>The resolution in lpi (lines per inch).
output_basename: Option<String>Basename to use for print-to-file.
output_file_format: Option<String>Format to use for print-to-file, one of PDF, PS, SVG
output_uri: Option<String>The uri used for print-to file.
Implementations
sourceimpl Settings
impl Settings
sourcepub fn orientation(self, orientation: Orientation) -> Self
pub fn orientation(self, orientation: Orientation) -> Self
Sets the orientation.
sourcepub fn paper_format(self, paper_format: &str) -> Self
pub fn paper_format(self, paper_format: &str) -> Self
Sets the paper name.
sourcepub fn paper_width(self, paper_width: &str) -> Self
pub fn paper_width(self, paper_width: &str) -> Self
Sets the paper width.
sourcepub fn paper_height(self, paper_height: &str) -> Self
pub fn paper_height(self, paper_height: &str) -> Self
Sets the paper height.
sourcepub fn default_source(self, default_source: &str) -> Self
pub fn default_source(self, default_source: &str) -> Self
Sets the default paper source.
sourcepub fn resolution(self, resolution: &str) -> Self
pub fn resolution(self, resolution: &str) -> Self
Sets the resolution, both resolution-x & resolution-y.
sourcepub fn reverse(self, reverse: &str) -> Self
pub fn reverse(self, reverse: &str) -> Self
Sets whether to reverse the order of the printed pages.
sourcepub fn media_type(self, media_type: &str) -> Self
pub fn media_type(self, media_type: &str) -> Self
Sets the media type.
sourcepub fn print_pages(self, print_pages: &str) -> Self
pub fn print_pages(self, print_pages: &str) -> Self
Sets what pages to print, one of all, selection, current or ranges.
sourcepub fn page_ranges(self, page_ranges: &str) -> Self
pub fn page_ranges(self, page_ranges: &str) -> Self
Sets a list of page ranges, formatted like this: 0-2,4,9-11.
sourcepub fn page_set(self, page_set: &str) -> Self
pub fn page_set(self, page_set: &str) -> Self
Sets what pages to print, one of all, even or odd.
sourcepub fn finishings(self, finishings: &str) -> Self
pub fn finishings(self, finishings: &str) -> Self
Sets the finishings.
sourcepub fn number_up_layout(self, number_up_layout: &str) -> Self
pub fn number_up_layout(self, number_up_layout: &str) -> Self
Sets the number up layout, one of lrtb, lrbt, rltb, rlbt, tblr, tbrl, btlr, btrl.
sourcepub fn output_bin(self, output_bin: &str) -> Self
pub fn output_bin(self, output_bin: &str) -> Self
Sets the output bin
sourcepub fn resolution_x(self, resolution_x: &str) -> Self
pub fn resolution_x(self, resolution_x: &str) -> Self
Sets the horizontal resolution in dpi.
sourcepub fn resolution_y(self, resolution_y: &str) -> Self
pub fn resolution_y(self, resolution_y: &str) -> Self
Sets the vertical resolution in dpi.
sourcepub fn output_basename(self, output_basename: &str) -> Self
pub fn output_basename(self, output_basename: &str) -> Self
Sets the print-to-file base name.
sourcepub fn output_file_format(self, output_file_format: &str) -> Self
pub fn output_file_format(self, output_file_format: &str) -> Self
Sets the print-to-file format, one of PS, PDF, SVG.
sourcepub fn output_uri(self, output_uri: &str) -> Self
pub fn output_uri(self, output_uri: &str) -> Self
Sets the print-to-file output uri.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'de, T> DynamicDeserialize<'de> for T where
T: Type + Deserialize<'de> + ?Sized,
impl<'de, T> DynamicDeserialize<'de> for T where
T: Type + Deserialize<'de> + ?Sized,
type Deserializer = PhantomData<T>
type Deserializer = PhantomData<T>
A DeserializeSeed implementation for this type.
impl<T> DynamicType for T where
T: Type + ?Sized,
impl<T> DynamicType for T where
T: Type + ?Sized,
pub fn dynamic_signature(&self) -> Signature<'_>
pub fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more
impl<T> NoneValue for T where
T: Default,
impl<T> NoneValue for T where
T: Default,
type NoneType = T
pub fn null_value() -> T
pub fn null_value() -> T
The none-equivalent value.