# Enum `kurogane::Permission`

```rust
#[non_exhaustive]
pub enum Permission {
    Camera,
    Microphone,
    ScreenVideo,
    ScreenAudio,
    Geolocation,
    Notifications,
    ClipboardRead,
    MidiSysex,
    CameraPanTiltZoom,
    ArSession,
    VrSession,
    HandTracking,
    CapturedSurfaceControl,
    StorageAccess,
    TopLevelStorageAccess,
    DiskQuota,
    LocalFonts,
    IdentityProvider,
    IdleDetection,
    KeyboardLock,
    PointerLock,
    ProtectedMediaIdentifier,
    RegisterProtocolHandler,
    WebAppInstallation,
    WindowManagement,
    FileSystemAccess,
    LocalNetwork,
    LoopbackNetwork,
    Sensors,
}
```

What a page asks for, in a [`PermissionRequest`].

[`PermissionRequest`]: https://kurogane-rs.org/docs/api/requests/permissionrequest.md

## Variants

### `Camera`

```rust
Camera
```

A camera (`getUserMedia` with video).

### `Microphone`

```rust
Microphone
```

A microphone (`getUserMedia` with audio).

### `ScreenVideo`

```rust
ScreenVideo
```

A picture of the screen (`getDisplayMedia`). There is no picker; once
allowed the page records the whole screen.

### `ScreenAudio`

```rust
ScreenAudio
```

The sound the system plays, with a picture of the screen.

### `Geolocation`

```rust
Geolocation
```

The device's location (`navigator.geolocation`).

### `Notifications`

```rust
Notifications
```

Showing notifications (`Notification.requestPermission`).

### `ClipboardRead`

```rust
ClipboardRead
```

Reading the clipboard (`navigator.clipboard.readText` and `read`).

### `MidiSysex`

```rust
MidiSysex
```

MIDI devices with system-exclusive messages
(`requestMIDIAccess({ sysex: true })`).

### `CameraPanTiltZoom`

```rust
CameraPanTiltZoom
```

Turning a camera (pan, tilt and zoom).

### `ArSession`

```rust
ArSession
```

An augmented-reality session (WebXR).

### `VrSession`

```rust
VrSession
```

A virtual-reality session (WebXR).

### `HandTracking`

```rust
HandTracking
```

Tracking the user's hands in a WebXR session.

### `CapturedSurfaceControl`

```rust
CapturedSurfaceControl
```

Scrolling and zooming a captured tab or window.

### `StorageAccess`

```rust
StorageAccess
```

An embedded site's own cookies and storage inside another site's
page (`document.requestStorageAccess`).

### `TopLevelStorageAccess`

```rust
TopLevelStorageAccess
```

A site's own cookies and storage inside the pages of other sites,
asked for by the site itself (`requestStorageAccessFor`).

### `DiskQuota`

```rust
DiskQuota
```

More disk space for the site's storage.

### `LocalFonts`

```rust
LocalFonts
```

The fonts installed on the system (`queryLocalFonts`).

### `IdentityProvider`

```rust
IdentityProvider
```

Signing in with the site as an identity provider (FedCM).

### `IdleDetection`

```rust
IdleDetection
```

Whether the user is idle (`IdleDetector`).

### `KeyboardLock`

```rust
KeyboardLock
```

Keys the system would otherwise take, such as Alt+Tab
(`navigator.keyboard.lock`).

### `PointerLock`

```rust
PointerLock
```

Holding the pointer inside the page (`requestPointerLock`).

### `ProtectedMediaIdentifier`

```rust
ProtectedMediaIdentifier
```

An identifier for playing protected media.

### `RegisterProtocolHandler`

```rust
RegisterProtocolHandler
```

Handling links of a URL scheme (`registerProtocolHandler`).

### `WebAppInstallation`

```rust
WebAppInstallation
```

Installing the site as an app.

### `WindowManagement`

```rust
WindowManagement
```

The screens' layout and placing windows on them
(`getScreenDetails`).

### `FileSystemAccess`

```rust
FileSystemAccess
```

Writing to files and folders the user picked (File System Access).

### `LocalNetwork`

```rust
LocalNetwork
```

Reaching devices on the local network.

### `LoopbackNetwork`

```rust
LoopbackNetwork
```

Reaching services on this computer.

### `Sensors`

```rust
Sensors
```

Motion and orientation sensors.

## Trait implementations

- `impl Clone for Permission`
- `impl Copy for Permission`
- `impl Debug for Permission`
- `impl Display for Permission`
- `impl Eq for Permission`
- `impl Hash for Permission`
- `impl PartialEq for Permission`

Source: https://github.com/0x48piraj/kurogane/blob/584c586118ee53cc04604007ee038557bd859092/kurogane/src/permissions.rs#L42
