pub fn default(instruction: &Instruction, _: &Layout) -> Result<Option<String>>Expand description
Default instruction printer which prints the Instruction’s Display
representation.
The default printer formats the instruction using its Display
implementation and writes it to stdout. The printed string is also
returned inside Ok(Some(...)) so callers can record or redisplay it.
§Arguments
instruction- TheInstructionto print._- The activeLayout(unused by the default printer).
§Errors
Returns an Err if writing to stdout or other I/O performed by the
underlying platform fails.
§Returns
Ok(Some(String)) containing the printed text on success.