Struct wkhtmltopdf::pdf::PdfApplication[][src]

pub struct PdfApplication { /* fields omitted */ }

Structure for initializing the underlying wkhtmltopdf

This is effective a wrapper around PdfGuard that provides a method for instantiating one a builder

Implementations

impl PdfApplication[src]

pub fn new() -> Result<PdfApplication>[src]

Initializes Wkhtmltopdf

Wkhtmltopdf will remain initialized for this process until PdfApplication is dropped. Wkhtmltopdf may only be initialized once per process, and and all PDF generation must happen from the same thread that initialized wkhtmltopdf.

Subsequent attempts to initialize wkhtmltopdf will return Error:IllegalInit.

pub fn builder(&self) -> PdfBuilder[src]

Instantiate a PdfBuilder

This method borrows the self mutably to ensure only that one builder is active at a time which is a basic limitation of wkhtmltopdf. Parallel execution is currently only possible by spawning multiple processes.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.