# Struct `kurogane::PermissionResponder`

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

Answers a [`PermissionRequest`] the hook left for later
([`PermissionDecision::Later`]), from any thread.

A request is answered once; the first answer counts. Dropping every
responder of a request without answering denies it. An answer that comes
after the page went away grants nothing.

```rust
App::new("./dist")
    .on_permission(|request, _| {
        let question = format!("Allow {:?} for {}?", request.permissions(), request.origin());
        let responder = request.responder();
        std::thread::spawn(move || {
            if ask_the_user(&question) {
                responder.allow();
            } else {
                responder.deny();
            }
        });
        PermissionDecision::Later
    })
    .run_or_exit();
```

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

## Methods

### `allow`

```rust
pub fn allow(self)
```

Grants everything the request asks for.

### `deny`

```rust
pub fn deny(self)
```

Grants nothing.

## Trait implementations

- `impl Debug for PermissionResponder`

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