Skip to main content

execute_with

Function execute_with 

Source
pub async fn execute_with<E, R, F, Fut>(
    stderr: &mut E,
    stdin: R,
    store: &SessionStore,
    args: &DiscardArgs,
    is_running: F,
) -> Result<i32>
where E: AsyncWrite + Unpin, R: AsyncBufRead + Unpin, F: FnOnce(String) -> Fut, Fut: Future<Output = Result<bool>>,
Expand description

Inner form: every effect is injected so the test suite can drive both the “container running” and “user typed n” branches deterministically. is_running takes String (not &str) so its returned future is 'static – avoids the HRTB friction with FnOnce(&str) -> impl Future.