#[non_exhaustive]pub enum Error {
Show 16 variants
Http(String),
InsecureUrl(String),
Parse(String),
NoMatchingAsset {
target_os: &'static str,
target_arch: &'static str,
},
ChecksumMismatch {
expected: String,
actual: String,
},
Signature(String),
VerificationRequired(String),
Payload(String),
ManifestExpired {
expires: String,
},
Install(String),
Location(String),
Permission(String),
Cancelled,
Delta(String),
UnsupportedPlatform(&'static str),
Io(Error),
}Expand description
Errors produced while checking for, downloading, verifying, or installing an update.
Use Error::kind to decide what to tell the user; the variants carry the
details.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Http(String)
A network request failed or returned a non-success status.
InsecureUrl(String)
A URL would be fetched without TLS: it, or a redirect it led to, is not
https://. Plain HTTP is accepted only for loopback hosts
(localhost, 127.0.0.0/8, ::1).
Parse(String)
Release metadata could not be parsed (bad JSON, missing fields, or an unparseable version tag).
NoMatchingAsset
No release asset matched the running platform.
Fields
ChecksumMismatch
The downloaded file’s SHA-256 did not match the expected checksum.
Fields
Signature(String)
Minisign signature verification failed.
VerificationRequired(String)
The configured Verification policy required a
check that could not run because its input was missing — no public key,
no published signature, or no published checksum.
Payload(String)
The downloaded app is not one the policy accepts: its bundle version differs from the release version, or it is not code-signed by the expected team.
ManifestExpired
The signed release manifest is past its expires time, so it may be
a stale copy replayed to hide newer releases.
Install(String)
Installing the downloaded update failed.
Location(String)
The app runs from a location it cannot update in place: a read-only
volume such as a mounted disk image, or the randomized read-only path
macOS App Translocation chose. Moving the app (for example into
/Applications) fixes it.
Permission(String)
The current user may not write where the update must go, such as an install directory owned by another user or by the system.
Cancelled
The operation was cancelled through a
CancelToken.
Delta(String)
A binary delta could not be created or applied: it is malformed, or the installed files are not the version it expects. The engine treats this as recoverable and falls back to the full download.
UnsupportedPlatform(&'static str)
The current platform has no install strategy yet.
Io(Error)
An underlying I/O error.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<&Error> for UpdateError
impl From<&Error> for UpdateError
Source§fn from(error: &Error) -> UpdateError
fn from(error: &Error) -> UpdateError
Source§impl From<Error> for UpdateError
impl From<Error> for UpdateError
Source§fn from(error: Error) -> UpdateError
fn from(error: Error) -> UpdateError
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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> 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