#[non_exhaustive]pub enum CopyAttempt {
Completed(CopyOutcome),
Declined(CopyDeclineReason),
}Expand description
Optional provider copy result.
§Examples
use qubit_fs::copy::{CopyMethod, CopyOutcome, CopyStats};
use qubit_fs::metadata::AchievedAtomicity;
use qubit_fs::spi::{CopyAttempt, CopyDeclineReason};
let attempt = CopyAttempt::Completed(CopyOutcome::new(
CopyStats::default(),
CopyMethod::Native,
AchievedAtomicity::Atomic,
));
assert!(matches!(attempt, CopyAttempt::Completed(_)));
let declined = CopyAttempt::Declined(CopyDeclineReason::NotApplicable);
assert!(matches!(declined, CopyAttempt::Declined(_)));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Completed(CopyOutcome)
A provider completed the copy.
Tuple Fields
§
0: CopyOutcomeProvider-confirmed completed copy outcome.
Declined(CopyDeclineReason)
The facade may select its later fallback.
Tuple Fields
§
0: CopyDeclineReasonReason the provider declined native execution.
Auto Trait Implementations§
impl Freeze for CopyAttempt
impl RefUnwindSafe for CopyAttempt
impl Send for CopyAttempt
impl Sync for CopyAttempt
impl Unpin for CopyAttempt
impl UnsafeUnpin for CopyAttempt
impl UnwindSafe for CopyAttempt
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