pub trait Runnable: Sized {
    type Err: ErrorDisplay;
    type Errs: MultiErrorDisplay<Self::Err>;

    fn new(cfg: ErgConfig) -> Self;
    fn input(&self) -> &Input;
    fn start_message(&self) -> String;
    fn finish(&mut self);
    fn clear(&mut self);
    fn eval(&mut self, src: Str) -> Result<String, Self::Errs>;

    fn ps1(&self) -> String { ... }
    fn ps2(&self) -> String { ... }
    fn quit(&self, code: i32) { ... }
    fn run(cfg: ErgConfig) { ... }
}
Expand description

this trait implements REPL (Read-Eval-Print-Loop) automatically

Required Associated Types

Required Methods

Provided Methods

Implementors