#[non_exhaustive]pub enum DownloadEvent<'a> {
Requested {
url: Url,
destination: &'a mut PathBuf,
},
Finished {
url: Url,
path: Option<PathBuf>,
success: bool,
},
}Expand description
Download event for the WebviewBuilder hook.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Requested
Download requested.
Fields
Finished
Download finished.
Fields
§
path: Option<PathBuf>Potentially representing the filesystem path the file was downloaded to.
A value of None being passed instead of a PathBuf does not necessarily indicate that the download
did not succeed, and may instead indicate some other failure - always check the third parameter if you need to
know if the download succeeded.
§Platform-specific:
- macOS: The second parameter indicating the path the file was saved to is always empty, due to API limitations.
Auto Trait Implementations§
impl<'a> Freeze for DownloadEvent<'a>
impl<'a> RefUnwindSafe for DownloadEvent<'a>
impl<'a> Send for DownloadEvent<'a>
impl<'a> Sync for DownloadEvent<'a>
impl<'a> Unpin for DownloadEvent<'a>
impl<'a> UnsafeUnpin for DownloadEvent<'a>
impl<'a> !UnwindSafe for DownloadEvent<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more