define RenderDyn, RenderBox

This commit is contained in:
🪞👃🪞 2025-01-05 11:24:49 +01:00
parent ee40fff168
commit f24d5dfed0
7 changed files with 20 additions and 22 deletions

View file

@ -12,7 +12,7 @@ fn main () -> Usually<()> {
pub struct Example;
impl EdnLayout<Tui> for &Example {
fn get_content <'a> (&'a self, sym: &'a str) -> Box<EdnRender<'a, Tui>> {
fn get_content <'a> (&'a self, sym: &'a str) -> RenderBox<'a, Tui> {
Box::new(Thunk::new(move||if sym == ":hello" { "Hello world!" } else { "" }))
}
}