Menu

Struct

DownloadRequest

kurogane::DownloadRequestSource
pub struct DownloadRequest { /* private fields */ }

A download about to start, passed to App::on_download.

Methods

#pub fn url(&self) -> &str

The URL the file comes from.

#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.

#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.

#pub fn mime_type(&self) -> &str

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

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

The browser the download comes from.

Trait implementations