Trait linefeed::function::Function [] [src]

pub trait Function<Term: Terminal> {
    fn execute(
        &self,
        reader: &mut Reader<Term>,
        count: i32,
        ch: char
    ) -> Result<()>; fn category(&self) -> Category { ... } }

Implements custom functionality for a Reader command

Required Methods

Executes the function.

count is the numerical argument supplied by the user; 1 by default. reader.explicit_arg() may be called to determine whether this value was explicitly supplied by the user.

ch is the final character of the sequence that triggered the command. reader.sequence() may be called to determine the full sequence that triggered the command.

Provided Methods

Returns the command category.

Implementors