pub struct AsyncWriteFixtureCase { /* private fields */ }Expand description
Owned request arguments for an asynchronous write cancellation probe.
Retain these arguments until the borrowed execution future is dropped.
into_parts transfers ownership to the driver; the probe can keep an
independent clone for target observation.
§Examples
use qubit_fs::path::Path;
use qubit_fs::write::{WriteDisposition, WriteOptions};
use qubit_fs_testkit::AsyncWriteFixtureCase;
let request = AsyncWriteFixtureCase::new(
Path::parse("/isolated/write-cancel")?,
b"payload".to_vec(),
WriteOptions::default().with_disposition(WriteDisposition::CreateNew),
);
assert_eq!(request.path().as_str(), "/isolated/write-cancel");
assert_eq!(request.bytes(), b"payload");
assert_eq!(request.options().disposition(), WriteDisposition::CreateNew);
let (path, bytes, options) = request.into_parts();
assert_eq!(path.as_str(), "/isolated/write-cancel");
assert_eq!(bytes, b"payload");
assert_eq!(options.disposition(), WriteDisposition::CreateNew);Implementations§
Source§impl AsyncWriteFixtureCase
impl AsyncWriteFixtureCase
Sourcepub const fn path(&self) -> &Path
pub const fn path(&self) -> &Path
Returns the destination path without transferring ownership.
§Returns
The prepared destination path.
Sourcepub const fn options(&self) -> &WriteOptions
pub const fn options(&self) -> &WriteOptions
Returns the write options without transferring ownership.
§Returns
The publication and durability options.
Sourcepub fn into_parts(self) -> (Path, Vec<u8>, WriteOptions)
pub fn into_parts(self) -> (Path, Vec<u8>, WriteOptions)
Decomposes the request into owned parts.
§Returns
The destination path, payload, and write options in that order.
Trait Implementations§
Source§impl Clone for AsyncWriteFixtureCase
impl Clone for AsyncWriteFixtureCase
Auto Trait Implementations§
impl Forget for AsyncWriteFixtureCase
impl Freeze for AsyncWriteFixtureCase
impl Move for AsyncWriteFixtureCase
impl RefUnwindSafe for AsyncWriteFixtureCase
impl Send for AsyncWriteFixtureCase
impl Sync for AsyncWriteFixtureCase
impl Unpin for AsyncWriteFixtureCase
impl UnsafeUnpin for AsyncWriteFixtureCase
impl UnwindSafe for AsyncWriteFixtureCase
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