Skip to main content

PrintSettings

Struct PrintSettings 

Source
pub struct PrintSettings {
Show 25 fields pub orientation: Orientation, pub paper: String, pub margins: [f32; 6], pub print_area: Option<RangeRef>, pub title_rows: Option<(u32, u32)>, pub title_cols: Option<(u32, u32)>, pub scale: u16, pub fit_to: Option<(u16, u16)>, pub gridlines: bool, pub headings: bool, pub center_h: bool, pub center_v: bool, pub header: String, pub footer: String, pub row_breaks: Vec<u32>, pub col_breaks: Vec<u32>, pub different_first: bool, pub different_odd_even: bool, pub first_header: String, pub first_footer: String, pub even_header: String, pub even_footer: String, pub hf_scale_with_doc: bool, pub hf_align_with_margins: bool, pub page_order: PageOrder,
}

Fields§

§orientation: Orientation§paper: String

Paper size name (Letter, A4, Legal…).

§margins: [f32; 6]

Margins in inches: left, right, top, bottom, header, footer.

§print_area: Option<RangeRef>§title_rows: Option<(u32, u32)>§title_cols: Option<(u32, u32)>§scale: u16

Percent scale, or fit to pages (wide, tall).

§fit_to: Option<(u16, u16)>§gridlines: bool§headings: bool§center_h: bool§center_v: bool§header: String

The header and footer of odd pages, and of every page unless the variants below apply.

§footer: String§row_breaks: Vec<u32>§col_breaks: Vec<u32>§different_first: bool

Different First Page: the sheet’s first printed page uses first_header/first_footer.

§different_odd_even: bool

Different Odd & Even Pages: even-numbered pages use even_header/even_footer.

§first_header: String§first_footer: String§even_header: String§even_footer: String§hf_scale_with_doc: bool

Scale with Document / Align with Page Margins (both on unless a file turned them off).

§hf_align_with_margins: bool§page_order: PageOrder

Page Setup › Sheet › Page order: the sequence pages are numbered and printed in when the sheet is more than one page wide and tall.

Implementations§

Source§

impl PrintSettings

Source

pub fn hf_page(&self, first: bool, number: usize) -> HfPage

The pair used by page number (1-based, as &P prints it); first is the sheet’s first page.

Source

pub fn hf(&self, page: HfPage, footer: bool) -> &String

The header (footer false) or footer of a page kind.

Source

pub fn hf_mut(&mut self, page: HfPage, footer: bool) -> &mut String

Any header or footer text at all (on any kind of page).

Trait Implementations§

Source§

impl Clone for PrintSettings

Source§

fn clone(&self) -> PrintSettings

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PrintSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PrintSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PrintSettings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for PrintSettings

Source§

fn eq(&self, other: &PrintSettings) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PrintSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PrintSettings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.