pub struct PrintProxy<'a>(_);Expand description
The interface lets sandboxed applications print.
Wrapper of the DBus interface: org.freedesktop.portal.Print.
Implementations
sourceimpl<'a> PrintProxy<'a>
impl<'a> PrintProxy<'a>
sourcepub async fn new(connection: &Connection) -> Result<PrintProxy<'a>, Error>
pub async fn new(connection: &Connection) -> Result<PrintProxy<'a>, Error>
Create a new instance of PrintProxy.
sourcepub async fn prepare_print(
&self,
identifier: &WindowIdentifier,
title: &str,
settings: Settings,
page_setup: PageSetup,
modal: bool
) -> Result<PreparePrint, Error>
pub async fn prepare_print(
&self,
identifier: &WindowIdentifier,
title: &str,
settings: Settings,
page_setup: PageSetup,
modal: bool
) -> Result<PreparePrint, Error>
Presents a print dialog to the user and returns print settings and page setup.
Arguments
identifier- Identifier for the application window.title- Title for the print dialog.settings-Settings.page_setup-PageSetup.modal- Whether the dialog should be a modal.
Specifications
See also PreparePrint.
sourcepub async fn print(
&self,
identifier: &WindowIdentifier,
title: &str,
fd: &impl AsRawFd,
token: Option<u32>,
modal: bool
) -> Result<(), Error>
pub async fn print(
&self,
identifier: &WindowIdentifier,
title: &str,
fd: &impl AsRawFd,
token: Option<u32>,
modal: bool
) -> Result<(), Error>
Asks to print a file. The file must be passed in the form of a file descriptor open for reading. This ensures that sandboxed applications only print files that they have access to.
Arguments
identifier- The application window identifier.title- The title for the print dialog.fd- File descriptor for reading the content to print.token- A token returned by a call toprepare_print().modal- Whether the dialog should be a modal.
Specifications
See also Print.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for PrintProxy<'a>
impl<'a> Send for PrintProxy<'a>
impl<'a> Sync for PrintProxy<'a>
impl<'a> Unpin for PrintProxy<'a>
impl<'a> !UnwindSafe for PrintProxy<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more