[][src]Trait epkard::Frontend

pub trait Frontend {
    fn background_color(&self) -> Color;
fn set_background_color(&mut self, color: Color);
fn clear(&mut self);
fn print_colored<S: ToString>(&mut self, text: S, color: Color);
fn newline(&mut self);
fn input(&mut self) -> String; fn print<S: ToString>(&mut self, text: S) { ... }
fn println<S: ToString>(&mut self, text: S) { ... } }

The frontend for a narrative that a user can interact with

Required methods

fn background_color(&self) -> Color

Get the background color

fn set_background_color(&mut self, color: Color)

Set the background color

fn clear(&mut self)

Clear the display

fn print_colored<S: ToString>(&mut self, text: S, color: Color)

Print text to the display with the given color

fn newline(&mut self)

Print a newline to the display

fn input(&mut self) -> String

Get input from the user

Loading content...

Provided methods

fn print<S: ToString>(&mut self, text: S)

Print text to the display

fn println<S: ToString>(&mut self, text: S)

Print text and a newline to the display

Loading content...

Implementors

impl Frontend for CliFrontend[src]

impl<'a, N, F> Frontend for Runtime<'a, N, F> where
    N: Node,
    F: Frontend
[src]

Loading content...