pub struct CopyFixtureCase { /* private fields */ }Expand description
Provider-prepared case that makes one native copy method applicable.
§Examples
use qubit_fs::copy::CopyOptions;
use qubit_fs::path::Path;
use qubit_fs_testkit::CopyFixtureCase;
let source = Path::parse("/source")?;
let target = Path::parse("/target")?;
let case = CopyFixtureCase::new(source, target, CopyOptions::file());
assert_eq!(case.source(), &Path::parse("/source")?);Implementations§
Source§impl CopyFixtureCase
impl CopyFixtureCase
Sourcepub fn new(source: Path, target: Path, options: CopyOptions) -> Self
pub fn new(source: Path, target: Path, options: CopyOptions) -> Self
Creates a native-copy case from its source, target, and requested options.
§Parameters
source- Source path passed to the copy operation.target- Destination path passed to the copy operation.options- Options that make the native method applicable.
§Returns
A prepared case containing the supplied arguments.
Sourcepub const fn target(&self) -> &Path
pub const fn target(&self) -> &Path
Returns the prepared target path without transferring ownership.
§Returns
The prepared destination path.
Sourcepub const fn options(&self) -> &CopyOptions
pub const fn options(&self) -> &CopyOptions
Sourcepub fn into_parts(self) -> (Path, Path, CopyOptions)
pub fn into_parts(self) -> (Path, Path, CopyOptions)
Decomposes the case into its owned request parts.
§Returns
The source path, destination path, and copy options in that order.
Trait Implementations§
Source§impl Clone for CopyFixtureCase
impl Clone for CopyFixtureCase
Auto Trait Implementations§
impl Forget for CopyFixtureCase
impl Freeze for CopyFixtureCase
impl Move for CopyFixtureCase
impl RefUnwindSafe for CopyFixtureCase
impl Send for CopyFixtureCase
impl Sync for CopyFixtureCase
impl Unpin for CopyFixtureCase
impl UnsafeUnpin for CopyFixtureCase
impl UnwindSafe for CopyFixtureCase
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