struct App<'a, W: Write> {
gen: i32,
period: i32,
world: PolyWorld,
status: Status,
paused: bool,
start_time: Option<Instant>,
timing: Duration,
reset: bool,
output: &'a mut W,
term_size: (u16, u16),
world_size: (i32, i32),
mode: Mode,
}
Fields§
§gen: i32
§period: i32
§world: PolyWorld
§status: Status
§paused: bool
§start_time: Option<Instant>
§timing: Duration
§reset: bool
§output: &'a mut W
§term_size: (u16, u16)
§world_size: (i32, i32)
§mode: Mode
Implementations§
source§impl<'a, W: Write> App<'a, W>
impl<'a, W: Write> App<'a, W>
fn new(world: PolyWorld, reset: bool, output: &'a mut W) -> Result<Self>
sourcefn update_header(&mut self) -> Result<()>
fn update_header(&mut self) -> Result<()>
Updates the header.
sourcefn update_main(&mut self) -> Result<()>
fn update_main(&mut self) -> Result<()>
Updates the footer.
sourcefn handle(&mut self, event: Option<Event>) -> Result<bool>
fn handle(&mut self, event: Option<Event>) -> Result<bool>
Handles a key event. Returns true
to quit the program.
sourceasync fn main_loop(&mut self, reader: &mut EventStream) -> Result<()>
async fn main_loop(&mut self, reader: &mut EventStream) -> Result<()>
The main loop.
Trait Implementations§
Auto Trait Implementations§
impl<'a, W> !RefUnwindSafe for App<'a, W>
impl<'a, W> !Send for App<'a, W>
impl<'a, W> !Sync for App<'a, W>
impl<'a, W> Unpin for App<'a, W>
impl<'a, W> !UnwindSafe for App<'a, W>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more