pub enum DownloadError {
Show 14 variants
OutsideRoot {
name: String,
root: PathBuf,
},
RelativeDirectory {
directory: String,
},
DirectoryNotCreated {
root: PathBuf,
source: Error,
},
DirectoryNotWritable {
root: PathBuf,
source: Error,
},
NameTaken {
path: PathBuf,
},
NoFreeName {
name: String,
attempts: usize,
},
Rejected {
name: String,
},
ValidationFailed {
name: String,
reason: String,
},
Io {
path: PathBuf,
source: Error,
},
CaptureTimeout {
timeout_ms: u64,
},
DownloadFailed {
id: String,
state: String,
failure: String,
},
ActionFailed {
reason: String,
},
Unsupported {
engine: String,
reason: String,
},
Transport {
reason: String,
},
}Expand description
Everything that can stop a download from reaching the caller’s directory.
Every variant names the file or directory it is about: a download that failed is reported by its own name, not by a generic I/O message that leaves the caller guessing which of several downloads is missing.
Variants§
OutsideRoot
A name would have placed the file outside the managed directory.
RelativeDirectory
downloads.directory was empty or relative.
DirectoryNotCreated
The download directory could not be created.
DirectoryNotWritable
The download directory exists but cannot be written to.
NameTaken
The name is taken and the conflict policy forbids replacing it.
NoFreeName
Every renamed candidate was taken too.
Rejected
The caller’s validation returned false.
ValidationFailed
The caller’s validation itself failed.
Fields
Io
Reading or writing a file failed.
CaptureTimeout
No download settled inside the capture’s budget.
DownloadFailed
A download settled without a file.
A failed or cancelled download is never reported as a success, which is the whole point of settling a capture on the artifact’s state rather than on the mere arrival of an event.
Fields
ActionFailed
The action a capture was told to run failed.
Unsupported
Downloads cannot be managed for this engine.
Fields
Transport
Talking to the browser failed.
Trait Implementations§
Source§impl Debug for DownloadError
impl Debug for DownloadError
Source§impl Display for DownloadError
impl Display for DownloadError
Source§impl Error for DownloadError
impl Error for DownloadError
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()