#[non_exhaustive]pub enum AssetError {
ExternalMissing {
id: &'static str,
path: String,
hint: &'static str,
analyzer: &'static str,
},
Unknown(String),
FetchNotPermitted {
id: &'static str,
files: usize,
first: &'static str,
analyzer: &'static str,
},
Fetch {
id: &'static str,
url: &'static str,
message: String,
},
UnsafeInstallPath {
id: &'static str,
path: &'static str,
},
UnsupportedPlatform {
id: &'static str,
os: &'static str,
arch: &'static str,
supported: String,
},
ArchiveMissing {
id: &'static str,
target: &'static str,
path: String,
},
DigestMismatch {
id: &'static str,
url: String,
expected: &'static str,
expected_bytes: u64,
actual: String,
actual_bytes: u64,
},
Io {
path: String,
source: Error,
},
Record(Error),
}Expand description
Errors raised while provisioning.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ExternalMissing
An AssetSource::External asset is not present, and Roteiro will not
fetch it. The message names the command that obtains it.
Fields
Unknown(String)
This build has no such asset.
FetchNotPermitted
A downloadable asset was asked for without a fetcher, which is what every
path except roteiro security prefetch does.
This is the offline contract stated as an error rather than as a comment: a run that finds a cold cache is told what to run, and is never quietly given a network connection instead.
Fields
Fetch
A download failed. The message is the fetcher’s, because it knows what went wrong and this module deliberately knows no transport.
Fields
UnsafeInstallPath
A DownloadFile::path is not a plain relative path.
Checked rather than trusted: these paths are compiled in today, but they
name where bytes from the network are written, and a .. in one would
write outside the asset cache.
UnsupportedPlatform
No sandbox runtime is pinned for this host platform.
Refused by name rather than left to fail as a link error later: a platform Roteiro has not pinned is a platform whose runtime bytes nobody has verified, and building against unverified bytes is the thing this whole path exists to prevent.
Fields
ArchiveMissing
A pinned archive is not provisioned, and this code path does not download.
Fields
DigestMismatch
A pinned archive’s bytes are not the bytes that were pinned.
This is the check that makes the sandbox runtime reproducible, so it is a hard failure with no override: a mismatch is either a truncated download, a redirected URL, or a substituted artifact, and none of those is something to carry on from. The size is reported alongside because a short body is the common case and two unequal digests do not say so.
Fields
Io
Reading or writing the cache failed.
Record(Error)
The provisioning record could not be read or written.
Trait Implementations§
Source§impl Debug for AssetError
impl Debug for AssetError
Source§impl Display for AssetError
impl Display for AssetError
Source§impl Error for AssetError
impl Error for AssetError
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()