[][src]Function rucline::prompt::read_line

pub fn read_line<O: ?Sized, C: ?Sized, S: ?Sized>(
    prompt: Option<&str>,
    buffer: Option<Buffer>,
    erase_after_read: bool,
    overrider: Option<&O>,
    completer: Option<&C>,
    suggester: Option<&S>
) -> Result<Outcome, Error> where
    O: Overrider,
    C: Completer,
    S: Suggester

Analogous to std::io::stdin().read_line(), however providing all the customization configured in the passed parameters.

This method will block until an input is committed by the user.

Calling this method directly can be cumbersome, therefore it is recommended to use the helper Prompt and Builder to craft the call.

Return

Errors

  • Error - If an error occurred while reading the user input.