# Struct `kurogane::PermissionRequest`

```rust
pub struct PermissionRequest { /* private fields */ }
```

A page asking for a device or a permission, passed to
[`App::on_permission`](https://kurogane-rs.org/docs/api/app/app.md#method.on_permission).

[crate::App::on_permission]: https://kurogane-rs.org/docs/api/app/app.md#method.on_permission

## Methods

### `origin`

```rust
pub fn origin(&self) -> &Origin
```

The origin that asks. It is the page's, or a frame's inside it when
the frame asks.

### `permissions`

```rust
pub fn permissions(&self) -> &[Permission]
```

What the request asks for, all of it together. A page asking for a
camera and a microphone at once is granted both or neither.

### `browser`

```rust
pub fn browser(&self) -> Option<BrowserId>
```

The browser of the page that asks.

### `responder`

```rust
pub fn responder(&self) -> PermissionResponder
```

A responder that answers this request later, from any thread, once
the hook returns [`PermissionDecision::Later`] (after asking the
user, for example). The responder does nothing after any other
answer from the hook.

[`PermissionDecision::Later`]: https://kurogane-rs.org/docs/api/requests/permissiondecision.md#variant.Later

## Trait implementations

- `impl Debug for PermissionRequest`

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