This commit is contained in:
🪞👃🪞 2024-07-03 00:08:41 +03:00
parent 3ae2467acc
commit 94c1f83ef2
13 changed files with 277 additions and 124 deletions

View file

@ -21,6 +21,16 @@ pub trait Render {
fn max_height (&self) -> u16 {
u16::MAX
}
//fn boxed (self) -> Box<dyn Render> where Self: Sized + 'static {
//Box::new(self)
//}
}
impl<T: Fn(&mut Buffer, Rect) -> Usually<Rect>> Render for T {
fn render (&self, b: &mut Buffer, a: Rect) -> Usually<Rect> {
(*self).render(b, a)
}
}
impl Render for Box<dyn Device> {