# Struct `kurogane::DownloadRequest`

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

A download about to start, passed to
[`App::on_download`](https://kurogane-rs.org/docs/api/app/app.md#method.on_download).

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

## Methods

### `url`

```rust
pub fn url(&self) -> &str
```

The URL the file comes from.

### `origin`

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

The origin of the page the download comes from. That is the document
the window shows, which a frame inside it counts as.

### `suggested_name`

```rust
pub fn suggested_name(&self) -> &str
```

The file name the server or the page suggests, a name only, without
a directory. Chromium has already made it safe for the platform.

### `mime_type`

```rust
pub fn mime_type(&self) -> &str
```

The file's MIME type, empty when it is unknown.

### `browser`

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

The browser the download comes from.

## Trait implementations

- `impl Clone for DownloadRequest`
- `impl Debug for DownloadRequest`

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