wip: layout split

This commit is contained in:
🪞👃🪞 2024-07-09 12:06:21 +03:00
parent c72f7c6f4b
commit 214061a419
3 changed files with 159 additions and 41 deletions

View file

@ -62,6 +62,12 @@ pub trait Render: Send {
}
}
impl Render for () {
fn render (&self, b: &mut Buffer, a: Rect) -> Usually<Rect> {
Ok(Rect { x: a.x, y: a.y, width: 0, height: 0 })
}
}
impl<T: Fn(&mut Buffer, Rect) -> Usually<Rect> + Send> Render for T {
fn render (&self, b: &mut Buffer, a: Rect) -> Usually<Rect> {
(*self)(b, a)