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()
Auto Trait Implementations§
impl !RefUnwindSafe for DownloadError
impl !UnwindSafe for DownloadError
impl Freeze for DownloadError
impl Send for DownloadError
impl Sync for DownloadError
impl Unpin for DownloadError
impl UnsafeUnpin for DownloadError
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> 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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for 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> 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