pub struct TrashProxy<'a>(_);Expand description
The interface lets sandboxed applications send files to the trashcan.
Wrapper of the DBus interface: org.freedesktop.portal.Trash.
Implementations
sourceimpl<'a> TrashProxy<'a>
impl<'a> TrashProxy<'a>
sourcepub async fn new(connection: &Connection) -> Result<TrashProxy<'a>, Error>
pub async fn new(connection: &Connection) -> Result<TrashProxy<'a>, Error>
Create a new instance of TrashProxy.
sourcepub async fn trash_file(&self, fd: &impl AsRawFd) -> Result<(), Error>
pub async fn trash_file(&self, fd: &impl AsRawFd) -> Result<(), Error>
Sends a file to the trashcan. Applications are allowed to trash a file if they can open it in read/write mode.
Arguments
fd- The file descriptor.
Specifications
See also TrashFile.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for TrashProxy<'a>
impl<'a> Send for TrashProxy<'a>
impl<'a> Sync for TrashProxy<'a>
impl<'a> Unpin for TrashProxy<'a>
impl<'a> !UnwindSafe for TrashProxy<'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