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

    const NAME: &'static str;
Show 16 methods fn new(cfg: ErgConfig) -> Self; fn cfg(&self) -> &ErgConfig; fn cfg_mut(&mut self) -> &mut ErgConfig; fn finish(&mut self); fn initialize(&mut self); fn clear(&mut self); fn eval(&mut self, src: String) -> Result<String, Self::Errs>; fn exec(&mut self) -> Result<i32, Self::Errs>; fn input(&self) -> &Input { ... } fn set_input(&mut self, input: Input) { ... } fn start_message(&self) -> String { ... } fn ps1(&self) -> String { ... } fn ps2(&self) -> String { ... } fn quit(&mut self, code: i32) -> ! { ... } fn quit_successfully(&mut self, output: BufWriter<StdoutLock<'_>>) -> ! { ... } fn run(cfg: ErgConfig) { ... }
}
Expand description

This trait implements REPL (Read-Eval-Print-Loop) automatically The exec method is called for file input, etc.

Required Associated Types§

Required Associated Constants§

Required Methods§

Erase all but immutable information.

Erase information that will no longer be meaningful in the next iteration

Provided Methods§

Implementors§