pub enum DownloadOutcome<L = PathBuf> {
Downloaded {
file: WasapiFile,
location: L,
verified: bool,
},
Failed {
file: WasapiFile,
error: Error,
},
Progress {
file: WasapiFile,
received: u64,
total: u64,
},
Skipped {
file: WasapiFile,
location: L,
},
StreamFailed {
error: Error,
},
}Expand description
Public per-file outcome surfaced to callers of every WasapiClient::download*
method. Failed carries per-file errors so a single bad file in a
collection doesn’t tear down the whole stream. StreamFailed carries
errors that happen before a file is available, such as a failed collection
listing request or destination preflight.
Variants§
Trait Implementations§
Source§impl<L: Debug> Debug for DownloadOutcome<L>
impl<L: Debug> Debug for DownloadOutcome<L>
Auto Trait Implementations§
impl<L> Freeze for DownloadOutcome<L>where
L: Freeze,
impl<L = PathBuf> !RefUnwindSafe for DownloadOutcome<L>
impl<L> Send for DownloadOutcome<L>where
L: Send,
impl<L> Sync for DownloadOutcome<L>where
L: Sync,
impl<L> Unpin for DownloadOutcome<L>where
L: Unpin,
impl<L> UnsafeUnpin for DownloadOutcome<L>where
L: UnsafeUnpin,
impl<L = PathBuf> !UnwindSafe for DownloadOutcome<L>
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.