pub enum Error {
UnsupportedPlatform {
os: String,
arch: String,
},
UnknownPlatformSlug(String),
Io {
context: String,
source: Error,
},
Http(Error),
HttpStatus {
url: String,
status: u16,
},
CurlFailed {
url: String,
code: i32,
},
ChecksumMismatch {
expected: String,
actual: String,
},
TomlParse(Error),
Zip(ZipError),
HyperdNotInArchive,
ScrapeFailed(&'static str),
}Expand description
Errors produced while downloading, verifying, and installing hyperd.
Every fallible function in this crate returns a Result<T, Error>. The
variants line up with the phases of bootstrap: platform detection,
HTTP/curl fetching, TOML parsing, archive extraction, and checksum
verification.
Variants§
UnsupportedPlatform
The host (os / arch combination) has no published hyperd build.
Fields
UnknownPlatformSlug(String)
A platform slug (e.g. "macos-arm64") did not match any known target.
Io
A filesystem or I/O operation failed, enriched with contextual text.
Fields
Http(Error)
A reqwest HTTP client error (connection failure, TLS issue, etc.).
HttpStatus
A server returned a non-success HTTP status while fetching url.
Fields
CurlFailed
The fallback curl subprocess exited with a non-zero status.
ChecksumMismatch
The downloaded archive did not match the expected SHA-256 checksum.
Fields
TomlParse(Error)
The hyperd-version.toml file could not be parsed.
Zip(ZipError)
The downloaded ZIP archive was malformed or could not be extracted.
HyperdNotInArchive
The archive did not contain a recognizable hyperd executable.
ScrapeFailed(&'static str)
Scraping the public releases page for the latest version failed.
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe 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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.