better structure

This commit is contained in:
2024-10-15 20:19:35 +02:00
parent 9e013f737f
commit d3b24cb3a8
4 changed files with 154 additions and 27 deletions
+6 -1
View File
@@ -3,8 +3,13 @@ use std::fmt::Debug;
pub mod components;
pub mod macros;
pub trait Component: Debug {}
pub trait Component: Debug {
fn render(&mut self) -> String {
String::new()
}
}
pub struct ComponentParams {
pub children: Vec<Box<dyn Component>>,
pub expr: String,
}