DownloadInterruptReason

Enum DownloadInterruptReason 

Source
#[repr(u32)]
pub enum DownloadInterruptReason {
Show 30 variants None = 0, FileFailed = 1, FileAccessDenied = 2, FileNoSpace = 3, FileNameTooLong = 4, FileTooLarge = 5, FileMalicious = 6, FileTransientError = 7, FileBlockedByPolicy = 8, FileSecurityCheckFailed = 9, FileTooShort = 10, FileHashMismatch = 11, NetworkFailed = 12, NetworkTimeout = 13, NetworkDisconnected = 14, NetworkServerDown = 15, NetworkInvalidRequest = 16, ServerFailed = 17, ServerNoRange = 18, ServerBadContent = 19, ServerUnauthorized = 20, ServerCertificateProblem = 21, ServerForbidden = 22, ServerUnexpectedResponse = 23, ServerContentLengthMismatch = 24, ServerCrossOriginRedirect = 25, UserCanceled = 26, UserShutdown = 27, UserPaused = 28, DownloadProcessCrashed = 29,
}
Expand description

Reason why a download was interrupted.

Variants§

§

None = 0

§

FileFailed = 1

Generic file error.

§

FileAccessDenied = 2

Access denied due to security restrictions.

§

FileNoSpace = 3

Disk full. User should free some space or choose a different location to store the file.

§

FileNameTooLong = 4

Result file path with file name is too long.

§

FileTooLarge = 5

File is too large for file system.

§

FileMalicious = 6

Microsoft Defender Smartscreen detected a virus in the file.

§

FileTransientError = 7

File was in use, too many files opened, or out of memory.

§

FileBlockedByPolicy = 8

File blocked by local policy.

§

FileSecurityCheckFailed = 9

Security check failed unexpectedly. Microsoft Defender SmartScreen could not scan this file.

§

FileTooShort = 10

Seeking past the end of a file in opening a file, as part of resuming an interrupted download. The file did not exist or was not as large as expected. Partially downloaded file was truncated or deleted, and download will be restarted automatically.

§

FileHashMismatch = 11

Partial file did not match the expected hash and was deleted. Download will be restarted automatically.

§

NetworkFailed = 12

Generic network error. User can retry the download manually.

§

NetworkTimeout = 13

Network operation timed out.

§

NetworkDisconnected = 14

Network connection lost. User can retry the download manually.

§

NetworkServerDown = 15

Server has gone down. User can retry the download manually.

§

NetworkInvalidRequest = 16

Network request invalid because original or redirected URI is invalid, has an unsupported scheme, or is disallowed by network policy.

§

ServerFailed = 17

Generic server error. User can retry the download manually.

§

ServerNoRange = 18

Server does not support range requests.

§

ServerBadContent = 19

Server does not have the requested data.

§

ServerUnauthorized = 20

Server did not authorize access to resource.

§

ServerCertificateProblem = 21

Server certificate problem.

§

ServerForbidden = 22

Server access forbidden.

§

ServerUnexpectedResponse = 23

Unexpected server response. Responding server may not be intended server. User can retry the download manually.

§

ServerContentLengthMismatch = 24

Server sent fewer bytes than the Content-Length header. Content-length header may be invalid or connection may have closed. Download is treated as complete unless there are strong validators present to interrupt the download.

§

ServerCrossOriginRedirect = 25

Unexpected cross-origin redirect.

§

UserCanceled = 26

User canceled the download.

§

UserShutdown = 27

User shut down the WebView. Resuming downloads that were interrupted during shutdown is not yet supported.

§

UserPaused = 28

User paused the download.

§

DownloadProcessCrashed = 29

WebView crashed.

Trait Implementations§

Source§

impl Clone for DownloadInterruptReason

Source§

fn clone(&self) -> DownloadInterruptReason

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DownloadInterruptReason

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for DownloadInterruptReason

Source§

fn eq(&self, other: &DownloadInterruptReason) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for DownloadInterruptReason

Source§

impl Eq for DownloadInterruptReason

Source§

impl StructuralPartialEq for DownloadInterruptReason

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.