pub struct AsyncCopyFailure { /* private fields */ }Expand description
Copy failure facts retained after an asynchronous copy operation.
§Examples
use qubit_fs::copy::{AsyncCopyFailure, CopyFailureState, CopyStats};
use qubit_fs::error::{FsError, FsErrorKind, FsOperation};
assert!(std::any::type_name::<AsyncCopyFailure>().contains("AsyncCopyFailure"));
let error = FsError::new(FsErrorKind::Io, FsOperation::Copy, "interrupted");
assert_eq!(CopyFailureState::Unchanged, CopyFailureState::Unchanged);
assert_eq!(0, CopyStats::default().bytes);
assert_eq!(FsOperation::Copy, error.operation());Implementations§
Source§impl AsyncCopyFailure
impl AsyncCopyFailure
Sourcepub const fn state(&self) -> CopyFailureState
pub const fn state(&self) -> CopyFailureState
Returns the confirmed publication state.
Sourcepub const fn partial_stats(&self) -> &CopyStats
pub const fn partial_stats(&self) -> &CopyStats
Returns partial transfer statistics.
Sourcepub fn into_parts(self) -> (FsError, CopyFailureState, CopyStats)
pub fn into_parts(self) -> (FsError, CopyFailureState, CopyStats)
Splits the failure into owned error, state, and progress facts.
Trait Implementations§
Source§impl Debug for AsyncCopyFailure
impl Debug for AsyncCopyFailure
Source§impl Display for AsyncCopyFailure
impl Display for AsyncCopyFailure
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncCopyFailure
impl !UnwindSafe for AsyncCopyFailure
impl Freeze for AsyncCopyFailure
impl Send for AsyncCopyFailure
impl Sync for AsyncCopyFailure
impl Unpin for AsyncCopyFailure
impl UnsafeUnpin for AsyncCopyFailure
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