#[non_exhaustive]pub enum ErrorKind {
Network,
Metadata,
Verification,
Location,
Permission,
Install,
Unsupported,
Cancelled,
Other,
}Expand description
The broad class of an Error, stable enough to drive user interface
decisions: which message to show, and whether retrying can help.
Error::kind and UpdateError::kind
return the same classification. A typical user interface reacts like
this:
| Kind | Typical user interface |
|---|---|
Network | “Try again later” |
Metadata | “Contact the developer” |
Verification | A security warning; do not offer a retry |
Location | “Move the app to Applications” |
Permission | “Ask an administrator”, or a manual download |
Install | A manual download link |
Unsupported | A manual download link |
Cancelled | Nothing |
Other | Show the message |
Location and Permission come before anything is downloaded; see
check_location.
Marked #[non_exhaustive]: match it with a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Network
The network failed: DNS, connect, timeout, or a non-success HTTP status. Retrying later may help.
Metadata
The release metadata is malformed or lists no artifact for this platform. The publisher has to fix it.
Verification
The update failed an integrity, authenticity, or transport-security check, or the policy requires a check the release cannot satisfy. Do not install it.
Location
The app runs from a location it cannot update in place, such as a disk image or an App Translocation path. Moving the app fixes it.
Permission
The current user may not write where the update must go.
Install
Installing failed for another reason.
Unsupported
This platform or artifact type has no install strategy.
Cancelled
The operation was cancelled on request.
Other
Anything else, such as a local I/O error.
Trait Implementations§
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more