pub struct RecordingRunner {
pub recorded: Mutex<Vec<CommandSpec>>,
/* private fields */
}Expand description
Records CommandSpec invocations and returns configurable exit statuses.
Fields§
§recorded: Mutex<Vec<CommandSpec>>Recorded for this item.
Implementations§
Source§impl RecordingRunner
impl RecordingRunner
Sourcepub fn always_success() -> Arc<Self> ⓘ
pub fn always_success() -> Arc<Self> ⓘ
Create a runner that succeeds for every spawn.
Sourcepub fn push_response(&self, response: RecordedResponse)
pub fn push_response(&self, response: RecordedResponse)
Queue responses consumed in FIFO order (defaults to success when empty).
Sourcepub fn specs(&self) -> Vec<CommandSpec>
pub fn specs(&self) -> Vec<CommandSpec>
Snapshot recorded specs.
Sourcepub fn stdin_payloads(&self) -> Vec<Vec<u8>>
pub fn stdin_payloads(&self) -> Vec<Vec<u8>>
Stdin bytes written to each spawned hook/filter, in spawn order.
Trait Implementations§
Source§impl CommandRunner for RecordingRunner
impl CommandRunner for RecordingRunner
Source§fn spawn(&self, spec: &CommandSpec) -> Result<RunningCommand>
fn spawn(&self, spec: &CommandSpec) -> Result<RunningCommand>
Start
spec and return a handle with stdio configured per the spec. Read moreSource§impl Debug for RecordingRunner
impl Debug for RecordingRunner
Auto Trait Implementations§
impl !Freeze for RecordingRunner
impl RefUnwindSafe for RecordingRunner
impl Send for RecordingRunner
impl Sync for RecordingRunner
impl Unpin for RecordingRunner
impl UnsafeUnpin for RecordingRunner
impl UnwindSafe for RecordingRunner
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