#[non_exhaustive]pub struct WriteOutcome {
pub hold: bool,
pub delay: Option<Duration>,
pub result: ScriptedResult,
}Expand description
One scripted write outcome: an optional hold, an optional delay, then a result.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.hold: boolWait for SinkScript::release_held before the delay starts.
delay: Option<Duration>Sleep this long (tokio time, controllable with test-util) before
resolving.
result: ScriptedResultHow the write resolves.
Implementations§
Source§impl WriteOutcome
impl WriteOutcome
Sourcepub fn held(self) -> Self
pub fn held(self) -> Self
Keep the write open until the test calls
SinkScript::release_held.
No amount of time releases a held write, real or tokio, so a test can assert what the pipeline does while a write is outstanding without reading a clock. A shutdown waits on a held write like any other, so release it before stopping the run.
Trait Implementations§
Source§impl Clone for WriteOutcome
impl Clone for WriteOutcome
Source§impl Debug for WriteOutcome
impl Debug for WriteOutcome
impl Eq for WriteOutcome
Source§impl PartialEq for WriteOutcome
impl PartialEq for WriteOutcome
impl StructuralPartialEq for WriteOutcome
Auto Trait Implementations§
impl Freeze for WriteOutcome
impl RefUnwindSafe for WriteOutcome
impl Send for WriteOutcome
impl Sync for WriteOutcome
impl Unpin for WriteOutcome
impl UnsafeUnpin for WriteOutcome
impl UnwindSafe for WriteOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.