pub struct PdfOptionsBuilder { /* private fields */ }Expand description
Builder for PdfOptions
Implementations§
Source§impl PdfOptionsBuilder
impl PdfOptionsBuilder
Sets whether to display header and footer
Sourcepub fn header_template(self, template: impl Into<String>) -> Self
pub fn header_template(self, template: impl Into<String>) -> Self
Sets the HTML template for the print header
Sets the HTML template for the print footer
Sourcepub fn print_background(self, print: bool) -> Self
pub fn print_background(self, print: bool) -> Self
Sets whether to print background graphics
Sourcepub fn page_ranges(self, ranges: impl Into<String>) -> Self
pub fn page_ranges(self, ranges: impl Into<String>) -> Self
Sets the page ranges to print
Sourcepub fn format(self, format: impl Into<String>) -> Self
pub fn format(self, format: impl Into<String>) -> Self
Sets the paper format (e.g., "Letter", "A4")
Sourcepub fn prefer_css_page_size(self, prefer: bool) -> Self
pub fn prefer_css_page_size(self, prefer: bool) -> Self
Sets whether to prefer page size as defined by CSS
Sourcepub fn build(self) -> PdfOptions
pub fn build(self) -> PdfOptions
Builds the PdfOptions
Trait Implementations§
Source§impl Clone for PdfOptionsBuilder
impl Clone for PdfOptionsBuilder
Source§fn clone(&self) -> PdfOptionsBuilder
fn clone(&self) -> PdfOptionsBuilder
Returns a duplicate 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 PdfOptionsBuilder
impl Debug for PdfOptionsBuilder
Source§impl Default for PdfOptionsBuilder
impl Default for PdfOptionsBuilder
Source§fn default() -> PdfOptionsBuilder
fn default() -> PdfOptionsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PdfOptionsBuilder
impl RefUnwindSafe for PdfOptionsBuilder
impl Send for PdfOptionsBuilder
impl Sync for PdfOptionsBuilder
impl Unpin for PdfOptionsBuilder
impl UnsafeUnpin for PdfOptionsBuilder
impl UnwindSafe for PdfOptionsBuilder
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