Skip to content

Instantly share code, notes, and snippets.

View cestlaviet8438's full-sized avatar
😱
Marveling at Cargo build times

việt trọng dΖ°Ζ‘ng cestlaviet8438

😱
Marveling at Cargo build times
  • somewhere on this confusing place we call earth
  • 07:46 (UTC +07:00)
View GitHub Profile
@cestlaviet8438
cestlaviet8438 / screen.rs
Created May 1, 2024 06:18
overriding trait methods with another trait - maybe horribly misguided considering oop background
//! A [Screen] to display content. Integral to Terminal Arcade's workings.
use {...};
/// The trait for handling drawing on the terminal and receiving events from the
/// user.
/// One should always start here when making a game/screen.
#[must_use]
pub trait Screen {
fn event(&mut self, _event: &Event) -> anyhow::Result<()> {