#[non_exhaustive]pub enum PermissionKind {
Show 16 variants
Microphone,
Camera,
Geolocation,
Notifications,
ClipboardRead,
DisplayCapture,
Midi,
Sensors,
MediaKeySystemAccess,
LocalFonts,
WindowManagement,
PointerLock,
AutomaticDownloads,
FileSystemAccess,
Autoplay,
Other,
}Expand description
Permission types that can be requested by the webview.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Microphone
Microphone access permission.
Camera
Camera access permission.
Geolocation
Geolocation access permission.
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION. - Linux: Supported via
GeolocationPermissionRequest. - Android: Supported via
WebChromeClient.onGeolocationPermissionsShowPrompt. - macOS / iOS: Not yet supported by platform backends.
Notifications
Notifications permission.
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS. - Linux: Supported via
NotificationPermissionRequest. - macOS / Android / iOS: Not yet supported by platform backends.
ClipboardRead
Clipboard read permission.
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ. - macOS / Linux / Android / iOS: Not yet supported by platform backends.
DisplayCapture
Display capture permission (for getDisplayMedia).
Midi
Midi access permission.
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_MIDI_SYSTEM_EXCLUSIVE_MESSAGES. - Android: Supported via
android.webkit.resource.MIDI_SYSEX. - macOS / Linux / iOS: Not yet supported by platform backends.
Sensors
Sensors (accelerometer, gyroscope, etc.) access permission.
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS. - macOS / Linux / Android / iOS: Not yet supported by platform backends.
MediaKeySystemAccess
Media key system access permission.
§Platform-specific
- Android: Supported via
android.webkit.resource.PROTECTED_MEDIA_ID. - Windows / macOS / Linux / iOS: Not yet supported by platform backends.
LocalFonts
Local fonts access permission.
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_LOCAL_FONTS. - macOS / Linux / Android / iOS: Not yet supported by platform backends.
WindowManagement
Window management permission.
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_WINDOW_MANAGEMENT. - macOS / Linux / Android / iOS: Not yet supported by platform backends.
PointerLock
Pointer lock permission.
§Platform-specific
- Linux: Supported via
PointerLockPermissionRequest. - Windows / macOS / Android / iOS: Not yet supported by platform backends.
AutomaticDownloads
Automatic downloads permission (multiple downloads without user interaction).
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_MULTIPLE_AUTOMATIC_DOWNLOADS. - macOS / Linux / Android / iOS: Not yet supported by platform backends.
FileSystemAccess
File system access permission (read/write via File System Access API).
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_FILE_READ_WRITE. - macOS / Linux / Android / iOS: Not yet supported by platform backends.
Autoplay
Media autoplay permission.
§Platform-specific
- Windows: Supported via
COREWEBVIEW2_PERMISSION_KIND_AUTOPLAY. - macOS / Linux / Android / iOS: Not yet supported by platform backends.
Other
Other unrecognized permission type.
Trait Implementations§
Source§impl Clone for PermissionKind
impl Clone for PermissionKind
Source§fn clone(&self) -> PermissionKind
fn clone(&self) -> PermissionKind
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 moreimpl Copy for PermissionKind
Source§impl Debug for PermissionKind
impl Debug for PermissionKind
Source§impl Display for PermissionKind
impl Display for PermissionKind
impl Eq for PermissionKind
Source§impl Hash for PermissionKind
impl Hash for PermissionKind
Source§impl PartialEq for PermissionKind
impl PartialEq for PermissionKind
impl StructuralPartialEq for PermissionKind
Auto Trait Implementations§
impl Freeze for PermissionKind
impl RefUnwindSafe for PermissionKind
impl Send for PermissionKind
impl Sync for PermissionKind
impl Unpin for PermissionKind
impl UnsafeUnpin for PermissionKind
impl UnwindSafe for PermissionKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.