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§
source§impl PageSetup
impl PageSetup
sourcepub fn name<'a>(self, name: impl Into<Option<&'a str>>) -> Self
pub fn name<'a>(self, name: impl Into<Option<&'a str>>) -> Self
Sets the name of the page setup.
sourcepub fn display_name<'a>(self, display_name: impl Into<Option<&'a str>>) -> Self
pub fn display_name<'a>(self, display_name: impl Into<Option<&'a str>>) -> Self
Sets the user visible name of the page setup.
sourcepub fn orientation(self, orientation: impl Into<Option<Orientation>>) -> Self
pub fn orientation(self, orientation: impl Into<Option<Orientation>>) -> Self
Sets the orientation.
sourcepub fn margin_top(self, margin_top: impl Into<Option<f64>>) -> Self
pub fn margin_top(self, margin_top: impl Into<Option<f64>>) -> Self
Sets the page top margin.
sourcepub fn margin_bottom(self, margin_bottom: impl Into<Option<f64>>) -> Self
pub fn margin_bottom(self, margin_bottom: impl Into<Option<f64>>) -> Self
Sets the page bottom margin.
sourcepub fn margin_right(self, margin_right: impl Into<Option<f64>>) -> Self
pub fn margin_right(self, margin_right: impl Into<Option<f64>>) -> Self
Sets the page right margin.
sourcepub fn margin_left(self, margin_left: impl Into<Option<f64>>) -> Self
pub fn margin_left(self, margin_left: impl Into<Option<f64>>) -> Self
Sets the page margin left.
Trait Implementations§
source§impl<'de> Deserialize<'de> for PageSetup
impl<'de> Deserialize<'de> for PageSetup
source§fn 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 Freeze for PageSetup
impl RefUnwindSafe for PageSetup
impl Send for PageSetup
impl Sync for PageSetup
impl Unpin for PageSetup
impl UnwindSafe for PageSetup
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<'de, T> DynamicDeserialize<'de> for T
impl<'de, T> DynamicDeserialize<'de> for T
§type Deserializer = PhantomData<T>
type Deserializer = PhantomData<T>
A DeserializeSeed implementation for this type.
source§fn deserializer_for_signature<S>(
signature: S,
) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
fn deserializer_for_signature<S>( signature: S, ) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
Get a deserializer compatible with this signature.
source§impl<T> DynamicType for T
impl<T> DynamicType for T
source§fn dynamic_signature(&self) -> Signature<'_>
fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
source§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.