Struct wee_rl::Editor [] [src]

pub struct Editor<C: Completer> { /* fields omitted */ }

Line editor

Methods

impl<C: Completer> Editor<C>
[src]

[src]

[src]

[src]

This method will read a line from STDIN and will display a prompt

[src]

Load the history from the specified file.

[src]

Save the history in the specified file.

[src]

Add a new entry in the history.

[src]

Clear history.

[src]

Return a mutable reference to the history object.

[src]

Return an immutable reference to the history object.

[src]

Register a callback function to be called for tab-completion.

[src]

Bind a sequence to a command.

[src]

Remove a binding for the given sequence.

[src]

let mut rl = wee_rl::Editor::<()>::new();
for readline in rl.iter("> ") {
    match readline {
        Ok(line) => {
            println!("Line: {}", line);
        },
        Err(err) => {
            println!("Error: {:?}", err);
            break
        }
    }
}

Trait Implementations

impl<C: Completer> Debug for Editor<C>
[src]

[src]

Formats the value using the given formatter.