pub struct FakeExecutor { /* private fields */ }Expand description
A deterministic command runner for integration tests.
Commands are recorded in submission order. Tests may enqueue completions for commands whose results are part of the scenario; commands without a queued completion are still recorded and produce no state change.
Implementations§
Source§impl FakeExecutor
impl FakeExecutor
pub fn new() -> Self
pub fn with_git(git: FakeGit) -> Self
pub fn git(&self) -> &FakeGit
pub fn git_mut(&mut self) -> &mut FakeGit
pub fn git_watch_id(&self) -> Option<RequestId>
pub fn next_git_watch_event(&mut self) -> Option<GitWatchEvent>
pub fn filesystem(&self) -> &FakeFilesystem
pub fn filesystem_mut(&mut self) -> &mut FakeFilesystem
pub fn record(&mut self, commands: impl IntoIterator<Item = Command>)
pub fn take_commands(&mut self) -> Vec<Command>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FakeExecutor
impl !UnwindSafe for FakeExecutor
impl Freeze for FakeExecutor
impl Send for FakeExecutor
impl Sync for FakeExecutor
impl Unpin for FakeExecutor
impl UnsafeUnpin for FakeExecutor
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.