pub trait Program:
Sized
+ Debug
+ Run {
type Command: Command;
// Required methods
fn parse<R: BufRead>(reader: R) -> Result<Self>;
fn commands(&self) -> &[Self::Command];
}
Expand description
A program is as large as a file or as small as a line.
Each program is to be treated as a complete single language entity, with
the explicit exception of {#}
blocks, which act as bridges between
programs.
§Working Thoughts
- Is simply iterating a collection of
commands
really the correct semantics for all the types of programs we want? - What language information do we still need to store?
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.