Skip to main content

run_repl

Function run_repl 

Source
pub async fn run_repl<TReplSession: ReplSession, TInput: AsyncBufRead + Unpin>(
    repl_session: &mut TReplSession,
    input: TInput,
    output: &mut impl Write,
    error_output: &mut impl Write,
    session_json: bool,
    show_prompt: bool,
) -> Result<()>
Expand description

Runs the prompt loop until quit/exit or end of input. Command output goes to output, errors to error_output; a failing line never ends the loop. In a --json session (session_json) prompts, help and login status also go to error_output, keeping output JSON-only. A per-line --json only changes that command’s output.