pub struct PageSetup {
pub ppdname: Option<String>,
pub name: Option<String>,
pub display_name: Option<String>,
pub width: Option<f64>,
pub height: Option<f64>,
pub margin_top: Option<f64>,
pub margin_bottom: Option<f64>,
pub margin_right: Option<f64>,
pub margin_left: Option<f64>,
pub orientation: Option<Orientation>,
}Expand description
Setup the printed pages.
Fields
ppdname: Option<String>the PPD name. It’s the name to select a given driver.
name: Option<String>The name of the page setup.
display_name: Option<String>The user-visible name of the page setup.
width: Option<f64>Paper width in millimeters.
height: Option<f64>Paper height in millimeters.
margin_top: Option<f64>Top margin in millimeters.
margin_bottom: Option<f64>Bottom margin in millimeters.
margin_right: Option<f64>Right margin in millimeters.
margin_left: Option<f64>Left margin in millimeters.
orientation: Option<Orientation>The page orientation.
Implementations
sourceimpl PageSetup
impl PageSetup
sourcepub fn display_name(self, display_name: &str) -> Self
pub fn display_name(self, display_name: &str) -> Self
Sets the user visible name of the page setup.
sourcepub fn orientation(self, orientation: Orientation) -> Self
pub fn orientation(self, orientation: Orientation) -> Self
Sets the orientation.
sourcepub fn margin_top(self, margin_top: f64) -> Self
pub fn margin_top(self, margin_top: f64) -> Self
Sets the page top margin.
sourcepub fn margin_bottom(self, margin_bottom: f64) -> Self
pub fn margin_bottom(self, margin_bottom: f64) -> Self
Sets the page bottom margin.
sourcepub fn margin_right(self, margin_right: f64) -> Self
pub fn margin_right(self, margin_right: f64) -> Self
Sets the page right margin.
sourcepub fn margin_left(self, margin_left: f64) -> Self
pub fn margin_left(self, margin_left: f64) -> Self
Sets the page margin left.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for PageSetup
impl<'de> Deserialize<'de> for PageSetup
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 PageSetup
impl Send for PageSetup
impl Sync for PageSetup
impl Unpin for PageSetup
impl UnwindSafe for PageSetup
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.