pub struct DeviceProxy<'a>(_);Expand description
The interface lets services ask if an application should get access to devices such as microphones, speakers or cameras. Not a portal in the strict sense, since the API is not directly accessible to applications inside the sandbox.
Wrapper of the DBus interface: org.freedesktop.portal.Device.
Implementations
sourceimpl<'a> DeviceProxy<'a>
impl<'a> DeviceProxy<'a>
sourcepub async fn new(connection: &Connection) -> Result<DeviceProxy<'a>, Error>
pub async fn new(connection: &Connection) -> Result<DeviceProxy<'a>, Error>
Create a new instance of DeviceProxy.
sourcepub async fn access_device(
&self,
pid: u32,
devices: &[Device]
) -> Result<(), Error>
pub async fn access_device(
&self,
pid: u32,
devices: &[Device]
) -> Result<(), Error>
Asks for access to a device.
Arguments
pid- The pid of the application on whose behalf the request is made.devices- A list of devices to request access to.
Note Asking for multiple devices at the same time may or may not be supported
Specifications
See also AccessDevice.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DeviceProxy<'a>
impl<'a> Send for DeviceProxy<'a>
impl<'a> Sync for DeviceProxy<'a>
impl<'a> Unpin for DeviceProxy<'a>
impl<'a> !UnwindSafe for DeviceProxy<'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