pub struct CommandExecutor;Implementations§
Source§impl CommandExecutor
impl CommandExecutor
Sourcepub fn start_recording()
pub fn start_recording()
Starts recording executed commands and enables dry-run/mock mode.
Sourcepub fn stop_recording() -> Option<Vec<String>>
pub fn stop_recording() -> Option<Vec<String>>
Stops recording executed commands and returns the list of recorded commands.
Sourcepub fn is_recording() -> bool
pub fn is_recording() -> bool
Returns whether we are currently in recording/dry-run mode.
Sourcepub fn register_mock(cmd: &str, output: &str)
pub fn register_mock(cmd: &str, output: &str)
Registers a mock stdout response for a given command.
Sourcepub fn register_mock_error(cmd: &str)
pub fn register_mock_error(cmd: &str)
Registers a deterministic failure for a matching recorded command.
Sourcepub fn clear_mocks()
pub fn clear_mocks()
Clears all mock command registrations.
Auto Trait Implementations§
impl Freeze for CommandExecutor
impl RefUnwindSafe for CommandExecutor
impl Send for CommandExecutor
impl Sync for CommandExecutor
impl Unpin for CommandExecutor
impl UnsafeUnpin for CommandExecutor
impl UnwindSafe for CommandExecutor
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].