pub struct PermissionsManager { /* private fields */ }Expand description
Manages browser permissions (camera, microphone, notifications, etc.)
Implementations§
Source§impl PermissionsManager
impl PermissionsManager
Sourcepub async fn grant(
&self,
origin: &str,
permissions: Vec<PermissionType>,
) -> Result<()>
pub async fn grant( &self, origin: &str, permissions: Vec<PermissionType>, ) -> Result<()>
Grant permissions for a specific origin. Common permissions: videoCapture, audioCapture, geolocation, notifications, clipboardReadWrite, displayCapture, sensors, etc.
Sourcepub async fn reset(&self, origin: &str) -> Result<()>
pub async fn reset(&self, origin: &str) -> Result<()>
Reset all permissions for a specific origin
Sourcepub async fn grant_camera(&self, origin: &str) -> Result<()>
pub async fn grant_camera(&self, origin: &str) -> Result<()>
Convenience: grant camera permission
Sourcepub async fn grant_microphone(&self, origin: &str) -> Result<()>
pub async fn grant_microphone(&self, origin: &str) -> Result<()>
Convenience: grant microphone permission
Sourcepub async fn grant_camera_and_microphone(&self, origin: &str) -> Result<()>
pub async fn grant_camera_and_microphone(&self, origin: &str) -> Result<()>
Convenience: grant camera + microphone permissions
Sourcepub async fn grant_notifications(&self, origin: &str) -> Result<()>
pub async fn grant_notifications(&self, origin: &str) -> Result<()>
Convenience: grant notifications permission
Sourcepub async fn grant_geolocation(&self, origin: &str) -> Result<()>
pub async fn grant_geolocation(&self, origin: &str) -> Result<()>
Convenience: grant geolocation permission
Sourcepub async fn grant_clipboard(&self, origin: &str) -> Result<()>
pub async fn grant_clipboard(&self, origin: &str) -> Result<()>
Convenience: grant clipboard access
Sourcepub async fn grant_all_common(&self, origin: &str) -> Result<()>
pub async fn grant_all_common(&self, origin: &str) -> Result<()>
Convenience: grant all common permissions for an origin
Trait Implementations§
Source§impl Clone for PermissionsManager
impl Clone for PermissionsManager
Source§fn clone(&self) -> PermissionsManager
fn clone(&self) -> PermissionsManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PermissionsManager
impl !UnwindSafe for PermissionsManager
impl Freeze for PermissionsManager
impl Send for PermissionsManager
impl Sync for PermissionsManager
impl Unpin for PermissionsManager
impl UnsafeUnpin for PermissionsManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more