Skip to main content

Printer

Struct Printer 

Source
pub struct Printer<R: Runtime> { /* private fields */ }
Expand description

Rust-side access to the printer APIs.

Implementations§

Source§

impl<R: Runtime> Printer<R>

Source

pub fn get_printers(&self) -> Result<Vec<PrinterItem>>

Source

pub fn get_printer(&self, id: &str) -> Result<PrinterItem>

Source

pub fn get_printer_by_name(&self, name: &str) -> Result<PrinterItem>

Source

pub fn get_default_printer(&self) -> Result<Option<PrinterItem>>

Source

pub fn set_default_printer(&self, name: &str) -> Result<PrinterItem>

Source

pub fn get_printer_capabilities( &self, name: &str, ) -> Result<PrinterCapabilities>

Source

pub fn get_jobs(&self, printer_name: &str) -> Result<Vec<PrintJob>>

Source

pub fn get_job(&self, printer_name: &str, job_id: i32) -> Result<PrintJob>

Source

pub fn resume_job(&self, printer_name: &str, job_id: i32) -> Result<PrintResult>

Source

pub fn restart_job( &self, printer_name: &str, job_id: i32, ) -> Result<PrintResult>

Source

pub fn pause_job(&self, printer_name: &str, job_id: i32) -> Result<PrintResult>

Source

pub fn remove_job(&self, printer_name: &str, job_id: i32) -> Result<PrintResult>

Source

pub fn print_pdf( &self, printer_name: Option<&str>, path: &Path, settings: &str, remove_after_print: bool, ) -> Result<PrintResult>

Source

pub fn print_pdf_data( &self, printer_name: Option<&str>, data: &str, settings: &str, ) -> Result<PrintResult>

Auto Trait Implementations§

§

impl<R> Freeze for Printer<R>
where PhantomData<fn() -> R>: Freeze,

§

impl<R> RefUnwindSafe for Printer<R>
where PhantomData<fn() -> R>: RefUnwindSafe,

§

impl<R> Send for Printer<R>
where PhantomData<fn() -> R>: Send,

§

impl<R> Sync for Printer<R>
where PhantomData<fn() -> R>: Sync,

§

impl<R> Unpin for Printer<R>
where PhantomData<fn() -> R>: Unpin,

§

impl<R> UnsafeUnpin for Printer<R>
where PhantomData<fn() -> R>: UnsafeUnpin,

§

impl<R> UnwindSafe for Printer<R>
where PhantomData<fn() -> R>: UnwindSafe,

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.