pub enum PrebuiltError {
NoMatchingAsset,
Download(String),
ChecksumMismatch {
expected: String,
actual: String,
},
Extract(String),
UnsupportedArchive {
url: String,
},
UnsafeUrl {
url: String,
},
InvalidSha256 {
sha256: String,
},
TooLarge {
max: u64,
},
Io(Error),
Verify(CommandVerifyError),
}Expand description
Why a prebuilt-binary install attempt failed. Variants distinguish “no asset for this host” (caller falls back to the setup script) from “asset matched but couldn’t be installed” (caller surfaces the error — security failures and network issues should not silently trigger a build).
Variants§
NoMatchingAsset
Host triple has no entry in extension.prebuilt. Caller should
fall back to the setup script. Not really an error — just a
signal that there’s nothing to try.
Download(String)
Network / HTTP problem fetching the URL.
ChecksumMismatch
Downloaded bytes don’t match the declared SHA-256. Treated as a hard failure (don’t fall back to setup) since this could indicate tampering, mirror corruption, or a stale manifest.
Extract(String)
tar / unzip exited non-zero or wasn’t on PATH.
UnsupportedArchive
The archive doesn’t end in a recognized suffix (we support
.tar.gz / .tgz / .tar.xz / .tar.bz2 / .zip).
UnsafeUrl
Asset URL must be https:// (or file:// in tests).
InvalidSha256
Manifest checksum is not exactly 64 hex characters.
TooLarge
Prebuilt response or stream exceeded the configured size cap.
Io(Error)
I/O setting up the temp file or moving extracted artifacts.
Verify(CommandVerifyError)
Asset extracted but the manifest’s extension.command still
doesn’t resolve. The archive layout is wrong.
Trait Implementations§
Source§impl Debug for PrebuiltError
impl Debug for PrebuiltError
Source§impl Display for PrebuiltError
impl Display for PrebuiltError
Source§impl Error for PrebuiltError
impl Error for PrebuiltError
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<CommandVerifyError> for PrebuiltError
impl From<CommandVerifyError> for PrebuiltError
Source§fn from(source: CommandVerifyError) -> Self
fn from(source: CommandVerifyError) -> Self
Auto Trait Implementations§
impl Freeze for PrebuiltError
impl !RefUnwindSafe for PrebuiltError
impl Send for PrebuiltError
impl Sync for PrebuiltError
impl Unpin for PrebuiltError
impl UnsafeUnpin for PrebuiltError
impl !UnwindSafe for PrebuiltError
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.