Skip to main content

qubit_fs_testkit/
file_system_fixture.rs

1// =============================================================================
2//    Copyright (c) 2026 Haixing Hu.
3//
4//    SPDX-License-Identifier: Apache-2.0
5//
6//    Licensed under the Apache License, Version 2.0.
7// =============================================================================
8//! Typed synchronous fixtures for filesystem contract suites.
9
10use qubit_fs as qfs;
11use qubit_fs::FileSystem;
12use qubit_fs::copy::CopyMethod;
13use qubit_fs::metadata::ResourceVersion;
14use qubit_fs::path::Path;
15
16use crate::CopyFixtureCase;
17use crate::FixtureResult;
18use crate::FixtureSupport;
19
20/// Supplies an isolated facade and provider-specific contract observations.
21///
22/// # Examples
23///
24/// ```
25/// # mod support { include!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/common/rustdoc_support.rs")); }
26/// # use support::RustdocSyncFixture;
27/// use qubit_fs_testkit::{FileSystemContractSuite, FileSystemFixture};
28///
29/// let fixture = RustdocSyncFixture::new();
30/// let suite = FileSystemContractSuite::new(&fixture);
31/// assert!(suite.run().report().checks().is_empty());
32/// ```
33pub trait FileSystemFixture {
34    /// Independently reports whether the provider implements the random-access
35    /// SPI operation. This must reflect provider configuration, not facade
36    /// range-read support. `Unsupported` means the suite cannot determine the
37    /// declaration and reports the optional check as skipped.
38    ///
39    /// # Returns
40    /// `Supported(true)` or `Supported(false)` with the independent SPI
41    /// declaration, or `Unsupported` when the fixture cannot observe it.
42    #[inline]
43    fn random_access_operation(&self) -> FixtureSupport<bool> {
44        FixtureSupport::Unsupported
45    }
46
47    /// Replaces a logical path while preserving objects already opened through
48    /// the provider. The implementation must use an independent fixture path
49    /// and must not perform the replacement through the facade under test.
50    ///
51    /// # Parameters
52    /// * `path` - Seeded path to replace.
53    /// * `bytes` - Content of the replacement object.
54    ///
55    /// # Returns
56    /// `Supported(())` when replacement is observable, otherwise `Unsupported`.
57    ///
58    /// # Errors
59    /// Returns [`FixtureError`](crate::FixtureError) when replacement setup
60    /// fails.
61    #[inline]
62    fn replace_random_access_path(&self, path: &Path, bytes: &[u8]) -> FixtureResult<FixtureSupport<()>> {
63        let _ = (path, bytes);
64        Ok(FixtureSupport::Unsupported)
65    }
66
67    /// Snapshots every logical path in the isolated configured namespace.
68    ///
69    /// Use the underlying SDK or fixture model, never the facade list method.
70    /// Include resources created by earlier checks, not only the current seed.
71    /// Returns unsupported when independent completeness cannot be established.
72    fn snapshot_namespace_paths(&self) -> FixtureResult<FixtureSupport<Vec<Path>>> {
73        Ok(FixtureSupport::Unsupported)
74    }
75
76    /// Independently prepares a copy source and a scenario-specific target.
77    ///
78    /// File scenarios contain the supplied bytes and use file options, with
79    /// required atomicity or durability for the respective strong scenario.
80    /// `Native` cases provide an independently seeded source containing
81    /// 1..=64 KiB; missing independent source evidence is reported as
82    /// unverified. `ServerSide` cases use provider-selected bytes that are
83    /// independently seeded and readable, contain 1..=64 KiB, and require
84    /// server-side copy. The suite independently checks source contents and
85    /// target absence before execution, then source and target contents after
86    /// execution; unavailable preparation or observation evidence is
87    /// reported as unverified. Ready cases have distinct paths, and Conflict
88    /// targets contain `b"existing"`.
89    /// Teardown must clean partial setup even when preparation fails.
90    ///
91    /// # Parameters
92    ///
93    /// * `scenario` - Copy behavior the contract suite will exercise.
94    /// * `source_relative` - Testkit-relative source path to prepare.
95    /// * `target_relative` - Testkit-relative destination path to prepare.
96    /// * `bytes` - File content used to seed file copy scenarios.
97    ///
98    /// # Returns
99    ///
100    /// A ready copy case or an unavailable result when the fixture cannot
101    /// independently prepare the requested scenario.
102    ///
103    /// # Errors
104    ///
105    /// Returns [`FixtureError`](crate::FixtureError) when fixture setup fails.
106    fn prepare_copy(
107        &self,
108        scenario: crate::CopyScenario,
109        source_relative: &str,
110        target_relative: &str,
111        bytes: &[u8],
112    ) -> FixtureResult<crate::FixturePreparation<crate::CopyFixtureCase>> {
113        if scenario == crate::CopyScenario::ServerSide {
114            return Ok(match self.copy_fast_path_case(qfs::copy::CopyMethod::ServerSide)? {
115                FixtureSupport::Supported(case) => crate::FixturePreparation::Ready(case),
116                FixtureSupport::Unsupported => crate::FixturePreparation::Unavailable {
117                    reason: "fixture has no server-side copy case".to_owned(),
118                },
119            });
120        }
121        if matches!(
122            scenario,
123            crate::CopyScenario::AtomicTree | crate::CopyScenario::DurableTree
124        ) {
125            let FixtureSupport::Supported(source) = self.seed_empty_directory(source_relative)? else {
126                return Ok(crate::FixturePreparation::Unavailable {
127                    reason: "tree root setup unavailable".to_owned(),
128                });
129            };
130            let sub_relative = format!("{source_relative}/sub");
131            if matches!(self.seed_empty_directory(&sub_relative)?, FixtureSupport::Unsupported) {
132                return Ok(crate::FixturePreparation::Unavailable {
133                    reason: "tree subdirectory setup unavailable".to_owned(),
134                });
135            }
136            let child_relative = format!("{source_relative}/sub/child");
137            if matches!(self.seed_file(&child_relative, bytes)?, FixtureSupport::Unsupported) {
138                return Ok(crate::FixturePreparation::Unavailable {
139                    reason: "tree child setup unavailable".to_owned(),
140                });
141            }
142            let target = self.path(target_relative)?;
143            let options = if scenario == crate::CopyScenario::AtomicTree {
144                qfs::copy::CopyOptions::tree().with_atomicity(qfs::metadata::AtomicityRequirement::Required)
145            } else {
146                qfs::copy::CopyOptions::tree().with_durability(qfs::metadata::DurabilityRequirement::Required)
147            };
148            return Ok(crate::FixturePreparation::Ready(crate::CopyFixtureCase::new(
149                source, target, options,
150            )));
151        }
152        let FixtureSupport::Supported(source) = self.seed_file(source_relative, bytes)? else {
153            return Ok(crate::FixturePreparation::Unavailable {
154                reason: "copy source seed unavailable".to_owned(),
155            });
156        };
157        let target = if scenario == crate::CopyScenario::Conflict {
158            let FixtureSupport::Supported(target) = self.seed_file(target_relative, b"existing")? else {
159                return Ok(crate::FixturePreparation::Unavailable {
160                    reason: "copy conflict target seed unavailable".to_owned(),
161                });
162            };
163            target
164        } else {
165            self.path(target_relative)?
166        };
167        let options = match scenario {
168            crate::CopyScenario::AtomicFile => {
169                qfs::copy::CopyOptions::file().with_atomicity(qfs::metadata::AtomicityRequirement::Required)
170            }
171            crate::CopyScenario::DurableFile => {
172                qfs::copy::CopyOptions::file().with_durability(qfs::metadata::DurabilityRequirement::Required)
173            }
174            _ => qfs::copy::CopyOptions::file(),
175        };
176        Ok(crate::FixturePreparation::Ready(crate::CopyFixtureCase::new(
177            source, target, options,
178        )))
179    }
180
181    /// Independently prepares an existing file for a selected deletion
182    /// scenario. Version hooks must provide evidence for
183    /// `DeleteScenario::IfMatch`.
184    ///
185    /// # Parameters
186    ///
187    /// * `_scenario` - Deletion behavior the contract suite will exercise.
188    /// * `relative` - Testkit-relative path for the file to seed.
189    /// * `bytes` - Exact initial content of the file.
190    ///
191    /// # Returns
192    ///
193    /// A ready file path or an unavailable result when independent seeding is
194    /// unsupported.
195    ///
196    /// # Errors
197    ///
198    /// Returns [`FixtureError`](crate::FixtureError) when fixture setup fails.
199    fn prepare_delete(
200        &self,
201        _scenario: crate::DeleteScenario,
202        relative: &str,
203        bytes: &[u8],
204    ) -> FixtureResult<crate::FixturePreparation<Path>> {
205        Ok(match self.seed_file(relative, bytes)? {
206            FixtureSupport::Supported(path) => crate::FixturePreparation::Ready(path),
207            FixtureSupport::Unsupported => crate::FixturePreparation::Unavailable {
208                reason: "fixture cannot seed deletion scenario".to_owned(),
209            },
210        })
211    }
212
213    /// Independently prepares one read scenario and its initial content.
214    ///
215    /// A Ready path must contain the supplied bytes, except for the explicit
216    /// corruption scenario. Version observations remain independent fixture
217    /// hooks. Preparation errors must not become inapplicability declarations.
218    ///
219    /// # Parameters
220    ///
221    /// * `scenario` - Read behavior for which the resource is prepared.
222    /// * `relative` - Testkit-relative path for the resource.
223    /// * `bytes` - Expected initial content except in the corruption scenario.
224    ///
225    /// # Returns
226    ///
227    /// A ready resource path or an unavailable result when independent setup
228    /// is unsupported.
229    ///
230    /// # Errors
231    ///
232    /// Returns [`FixtureError`](crate::FixtureError) when fixture setup fails.
233    fn prepare_read(
234        &self,
235        scenario: crate::ReadScenario,
236        relative: &str,
237        bytes: &[u8],
238    ) -> FixtureResult<crate::FixturePreparation<Path>> {
239        let prepared = if scenario == crate::ReadScenario::ChecksumCorruption {
240            self.checksum_failure_case(relative)?
241        } else {
242            self.seed_file(relative, bytes)?
243        };
244        Ok(match prepared {
245            FixtureSupport::Supported(path) => crate::FixturePreparation::Ready(path),
246            FixtureSupport::Unsupported => crate::FixturePreparation::Unavailable {
247                reason: "fixture cannot independently prepare this read scenario".to_owned(),
248            },
249        })
250    }
251
252    /// Prepares one write scenario without invoking the tested write facade.
253    ///
254    /// The default prepares CreateNew and durable creation requests. Atomic
255    /// replacement, creation conflicts and append use independent seeding.
256    /// Other scenarios require provider-specific setup and evidence.
257    ///
258    /// # Parameters
259    ///
260    /// * `scenario` - Write behavior the contract suite will exercise.
261    /// * `relative` - Testkit-relative path for the resource.
262    /// * `bytes` - Content the write case supplies to the tested operation.
263    ///
264    /// # Returns
265    ///
266    /// A ready write case or an unavailable result when the fixture cannot
267    /// independently prepare the requested scenario.
268    ///
269    /// # Errors
270    ///
271    /// Returns [`FixtureError`](crate::FixtureError) when fixture setup fails.
272    fn prepare_write(
273        &self,
274        scenario: crate::WriteScenario,
275        relative: &str,
276        bytes: &[u8],
277    ) -> FixtureResult<crate::FixturePreparation<crate::WriteFixtureCase>> {
278        if scenario == crate::WriteScenario::Replace {
279            let FixtureSupport::Supported(path) = self.seed_file(relative, b"previous contents")? else {
280                return Ok(crate::FixturePreparation::Unavailable {
281                    reason: "replacement seed unavailable".to_owned(),
282                });
283            };
284            return Ok(crate::FixturePreparation::Ready(crate::WriteFixtureCase::new(
285                path,
286                bytes.to_vec(),
287                qfs::write::WriteOptions::default(),
288            )));
289        }
290        if scenario == crate::WriteScenario::CreateConflict {
291            let FixtureSupport::Supported(path) = self.seed_file(relative, b"a")? else {
292                return Ok(crate::FixturePreparation::Unavailable {
293                    reason: "creation conflict seed unavailable".to_owned(),
294                });
295            };
296            return Ok(crate::FixturePreparation::Ready(crate::WriteFixtureCase::new(
297                path,
298                bytes.to_vec(),
299                qfs::write::WriteOptions::default().with_disposition(qfs::write::WriteDisposition::CreateNew),
300            )));
301        }
302        if scenario == crate::WriteScenario::Append {
303            let FixtureSupport::Supported(path) = self.seed_file(relative, b"before")? else {
304                return Ok(crate::FixturePreparation::Unavailable {
305                    reason: "append seed unavailable".to_owned(),
306                });
307            };
308            return Ok(crate::FixturePreparation::Ready(crate::WriteFixtureCase::new(
309                path,
310                bytes.to_vec(),
311                qfs::write::WriteOptions::default().with_disposition(qfs::write::WriteDisposition::Append),
312            )));
313        }
314        if scenario == crate::WriteScenario::AtomicReplace {
315            let FixtureSupport::Supported(path) = self.seed_file(relative, b"a")? else {
316                return Ok(crate::FixturePreparation::Unavailable {
317                    reason: "atomic replacement seed unavailable".to_owned(),
318                });
319            };
320            return Ok(crate::FixturePreparation::Ready(crate::WriteFixtureCase::new(
321                path,
322                bytes.to_vec(),
323                qfs::write::WriteOptions::default().with_atomicity(qfs::metadata::AtomicityRequirement::Required),
324            )));
325        }
326        if scenario == crate::WriteScenario::Durable {
327            return Ok(crate::FixturePreparation::Ready(crate::WriteFixtureCase::new(
328                self.path(relative)?,
329                bytes.to_vec(),
330                qfs::write::WriteOptions::default()
331                    .with_disposition(qfs::write::WriteDisposition::CreateNew)
332                    .with_durability(qfs::metadata::DurabilityRequirement::Required),
333            )));
334        }
335        if !matches!(scenario, crate::WriteScenario::Create | crate::WriteScenario::Abort) {
336            return Ok(crate::FixturePreparation::Unavailable {
337                reason: "fixture does not prepare this write scenario".to_owned(),
338            });
339        }
340        Ok(crate::FixturePreparation::Ready(crate::WriteFixtureCase::new(
341            self.path(relative)?,
342            bytes.to_vec(),
343            qfs::write::WriteOptions::default().with_disposition(qfs::write::WriteDisposition::CreateNew),
344        )))
345    }
346
347    /// Returns the concrete synchronous filesystem facade under test.
348    ///
349    /// # Returns
350    ///
351    /// The isolated filesystem facade owned by this fixture.
352    fn file_system(&self) -> &FileSystem;
353
354    /// Maps a testkit-relative name to an isolated logical path.
355    ///
356    /// # Parameters
357    ///
358    /// * `relative` - Suite-generated name relative to the fixture namespace.
359    ///
360    /// # Returns
361    ///
362    /// The corresponding logical path within the isolated namespace.
363    ///
364    /// # Errors
365    ///
366    /// Returns [`FixtureError`](crate::FixtureError) when the name cannot be
367    /// represented by the provider's path model.
368    fn path(&self, relative: &str) -> FixtureResult<Path>;
369
370    /// Reports whether copy requests must use the stream fallback.
371    ///
372    /// Override this when the fixture is designed to exercise only fallback
373    /// copying, so contract checks do not expect provider-native fast paths.
374    ///
375    /// # Returns
376    ///
377    /// `true` when the suite must restrict copy checks to stream fallback;
378    /// otherwise, `false`.
379    #[must_use]
380    #[inline]
381    fn copy_fallback_only(&self) -> bool {
382        false
383    }
384
385    /// Maps a relative list prefix for the supplied root.
386    ///
387    /// # Parameters
388    ///
389    /// * `root` - Logical directory passed to the list operation.
390    /// * `relative` - Testkit-relative descendant selected by the contract.
391    ///
392    /// # Returns
393    ///
394    /// The provider-specific prefix expected by its list implementation.
395    ///
396    /// # Errors
397    ///
398    /// Returns [`FixtureError`](crate::FixtureError) when the prefix cannot be
399    /// represented for the supplied root.
400    #[inline]
401    fn list_prefix(&self, root: &Path, relative: &str) -> FixtureResult<String> {
402        let _ = root;
403        Ok(relative.to_owned())
404    }
405
406    /// Seeds a complete file outside the operation currently under test.
407    ///
408    /// # Parameters
409    ///
410    /// * `relative` - Testkit-relative path for the seeded file.
411    /// * `bytes` - Exact content to publish.
412    ///
413    /// # Returns
414    ///
415    /// `Supported(path)` when seeding succeeds, or `Unsupported` when the
416    /// fixture cannot prepare files out of band.
417    ///
418    /// # Errors
419    ///
420    /// Returns [`FixtureError`](crate::FixtureError) when provider-specific
421    /// setup fails.
422    #[inline]
423    fn seed_file(&self, relative: &str, bytes: &[u8]) -> FixtureResult<FixtureSupport<Path>> {
424        let _ = (relative, bytes);
425        Ok(FixtureSupport::Unsupported)
426    }
427
428    /// Reads a complete file outside the operation currently under test.
429    ///
430    /// # Parameters
431    ///
432    /// * `path` - Logical path to observe.
433    ///
434    /// # Returns
435    ///
436    /// `Supported(bytes)` with the complete content, or `Unsupported` when the
437    /// fixture cannot observe files out of band.
438    ///
439    /// # Errors
440    ///
441    /// Returns [`FixtureError`](crate::FixtureError) when provider-specific
442    /// observation fails.
443    #[inline]
444    fn read_file(&self, path: &Path) -> FixtureResult<FixtureSupport<Vec<u8>>> {
445        let _ = path;
446        Ok(FixtureSupport::Unsupported)
447    }
448
449    /// Observes whether a resource exists without using the tested facade.
450    ///
451    /// This independent observation lets a contract check distinguish the
452    /// operation's effect from the facade's own reported result.
453    ///
454    /// # Parameters
455    ///
456    /// * `path` - Logical resource path to inspect.
457    ///
458    /// # Returns
459    ///
460    /// `Supported(true)` or `Supported(false)` when existence can be observed,
461    /// or `Unsupported` when no independent observation is available.
462    ///
463    /// # Errors
464    ///
465    /// Returns [`FixtureError`](crate::FixtureError) when the provider's
466    /// independent observation fails.
467    #[inline]
468    fn exists_out_of_band(&self, path: &Path) -> FixtureResult<FixtureSupport<bool>> {
469        let _ = path;
470        Ok(FixtureSupport::Unsupported)
471    }
472
473    /// Writes a complete resource through fixture-owned setup facilities.
474    ///
475    /// This hook prepares or restores state without exercising the facade
476    /// operation whose contract is under test.
477    ///
478    /// # Parameters
479    ///
480    /// * `path` - Logical resource path to write.
481    /// * `bytes` - Exact content to publish.
482    ///
483    /// # Returns
484    ///
485    /// `Supported(())` when the out-of-band write is available, or
486    /// `Unsupported` when the fixture cannot write independently.
487    ///
488    /// # Errors
489    ///
490    /// Returns [`FixtureError`](crate::FixtureError) when fixture-owned setup
491    /// fails.
492    #[inline]
493    fn write_file_out_of_band(&self, path: &Path, bytes: &[u8]) -> FixtureResult<FixtureSupport<()>> {
494        let _ = (path, bytes);
495        Ok(FixtureSupport::Unsupported)
496    }
497
498    /// Observes the current provider version outside the operation under test.
499    ///
500    /// The returned token is evidence for version-conditional contract checks
501    /// and must come from an observation independent of the tested operation.
502    ///
503    /// # Parameters
504    ///
505    /// * `path` - Logical resource path whose version is observed.
506    ///
507    /// # Returns
508    ///
509    /// `Supported(version)` when a provider version is available, or
510    /// `Unsupported` when it cannot be observed independently.
511    ///
512    /// # Errors
513    ///
514    /// Returns [`FixtureError`](crate::FixtureError) when version observation
515    /// fails.
516    #[inline]
517    fn resource_version(&self, path: &Path) -> FixtureResult<FixtureSupport<ResourceVersion>> {
518        let _ = path;
519        Ok(FixtureSupport::Unsupported)
520    }
521
522    /// Returns a valid version that does not match the current resource.
523    ///
524    /// The token must be valid for the provider's conditional operation while
525    /// being guaranteed not to identify the resource's current version.
526    ///
527    /// # Parameters
528    ///
529    /// * `path` - Logical resource path whose current version must not match.
530    ///
531    /// # Returns
532    ///
533    /// `Supported(version)` with a valid stale token, or `Unsupported` when
534    /// the fixture cannot establish that condition.
535    ///
536    /// # Errors
537    ///
538    /// Returns [`FixtureError`](crate::FixtureError) when stale-token
539    /// preparation fails.
540    #[inline]
541    fn stale_resource_version(&self, path: &Path) -> FixtureResult<FixtureSupport<ResourceVersion>> {
542        let _ = path;
543        Ok(FixtureSupport::Unsupported)
544    }
545
546    /// Supplies an independently prepared resource whose checksum is invalid.
547    ///
548    /// The resource must be readable as a checksum-corruption scenario without
549    /// using the read operation under test to create the corruption.
550    ///
551    /// # Parameters
552    ///
553    /// * `relative` - Testkit-relative path for the corrupted resource.
554    ///
555    /// # Returns
556    ///
557    /// `Supported(path)` when an invalid-checksum resource is prepared, or
558    /// `Unsupported` when the provider cannot offer this scenario.
559    ///
560    /// # Errors
561    ///
562    /// Returns [`FixtureError`](crate::FixtureError) when preparation fails.
563    #[inline]
564    fn checksum_failure_case(&self, relative: &str) -> FixtureResult<FixtureSupport<Path>> {
565        let _ = relative;
566        Ok(FixtureSupport::Unsupported)
567    }
568
569    /// Independently releases every resource owned by this fixture.
570    ///
571    /// This mandatory operation must be idempotent and must reclaim partially
572    /// prepared resources and staging state, including resources unknown to
573    /// the suite. Use a native or out-of-band channel independent of the
574    /// facade under test. Return an error if cleanup could not be confirmed.
575    /// A cancelled asynchronous attempt must remain safe to retry.
576    ///
577    /// # Returns
578    ///
579    /// `Ok(())` when cleanup is confirmed; otherwise, a fixture error
580    /// describing the cleanup failure.
581    ///
582    /// # Errors
583    ///
584    /// Returns [`FixtureError`](crate::FixtureError) when any owned resource
585    /// or staging state could not be reclaimed or confirmed.
586    fn teardown(&self) -> FixtureResult<()>;
587
588    /// Seeds an empty directory or prefix outside the operation under test.
589    ///
590    /// Providers may represent directories as explicit resources or prefixes;
591    /// the returned path identifies the seeded logical root in either model.
592    ///
593    /// # Parameters
594    ///
595    /// * `relative` - Testkit-relative path for the empty directory.
596    ///
597    /// # Returns
598    ///
599    /// `Supported(path)` when setup succeeds, or `Unsupported` when this
600    /// provider cannot seed an empty directory.
601    ///
602    /// # Errors
603    ///
604    /// Returns [`FixtureError`](crate::FixtureError) when setup fails.
605    #[inline]
606    fn seed_empty_directory(&self, relative: &str) -> FixtureResult<FixtureSupport<Path>> {
607        let _ = relative;
608        Ok(FixtureSupport::Unsupported)
609    }
610
611    /// Seeds a symbolic link outside the operation under test.
612    ///
613    /// The link target is chosen by the provider; this hook reports support
614    /// only when the resulting link can be used by the relevant contract.
615    ///
616    /// # Parameters
617    ///
618    /// * `relative` - Testkit-relative path at which to create the link.
619    ///
620    /// # Returns
621    ///
622    /// `Supported(path)` when the link is prepared, or `Unsupported` when the
623    /// provider cannot create a suitable symbolic link.
624    ///
625    /// # Errors
626    ///
627    /// Returns [`FixtureError`](crate::FixtureError) when link setup fails.
628    #[inline]
629    fn seed_symlink(&self, relative: &str) -> FixtureResult<FixtureSupport<Path>> {
630        let _ = relative;
631        Ok(FixtureSupport::Unsupported)
632    }
633
634    /// Supplies a case in which the requested native copy method must apply.
635    ///
636    /// # Parameters
637    ///
638    /// * `method` - Native copy method the prepared request must exercise.
639    ///
640    /// # Returns
641    ///
642    /// `Supported(case)` when the fixture can prepare an applicable request,
643    /// or `Unsupported` when no such provider-specific case is available. For
644    /// `Native`, the case must be a single file with a distinct, independently
645    /// confirmed absent target and an independently seeded source containing
646    /// 1..=64 KiB. Return `Unsupported` when those native-specific premises
647    /// cannot be guaranteed; a streamed result does not satisfy this request.
648    /// The source and target are registered for fixture cleanup as soon as the
649    /// case is returned.
650    ///
651    /// # Errors
652    ///
653    /// Returns [`FixtureError`](crate::FixtureError) when provider-specific
654    /// case preparation fails.
655    #[inline]
656    fn copy_fast_path_case(&self, method: CopyMethod) -> FixtureResult<FixtureSupport<CopyFixtureCase>> {
657        let _ = method;
658        Ok(FixtureSupport::Unsupported)
659    }
660}