Skip to main content

select_from_options_with_io

Function select_from_options_with_io 

Source
pub fn select_from_options_with_io<T: InputOutput>(
    prompt: &str,
    options: &[(String, String)],
    io: &T,
) -> Result<String, Error>
Expand description

Testable version of select_from_options that accepts an InputOutput trait

ยงErrors

Returns an error if no options provided, input operations fail, or maximum retries exceeded