Compiling checkpoint

This commit is contained in:
Nathan Sobo 2023-08-15 19:29:57 -06:00
parent e7489bd4c9
commit 65a5c54a2c
7 changed files with 224 additions and 82 deletions

View file

@ -0,0 +1,48 @@
// type Result = ();
// type LayoutContext<> = ();
// trait Element<V: 'static>: 'static + Clone {
// type Layout: 'static;
// fn style_mut(&mut self) -> &mut Style;
// fn layout(&mut self, view: &mut V, cx: &mut LayoutContext<V>)
// -> Result<(NodeId, Self::Layout)>;
// fn paint<'a>(
// &mut self,
// layout: Layout<'a, Self::Layout>,
// view: &mut V,
// cx: &mut PaintContext<V>,
// ) -> Result<()>;
// }
// struct Button {
// style: Style,
// }
// type Style = ();
// impl Button {
// fn render<V>() -> impl Element<V> {
// todo!()
// }
// }
// impl<V: 'static> Element<V> for Foo {
// type Layout = ();
// fn style_mut(&mut self) -> &mut Style {
// unimplemented!()
// }
// fn layout(
// &mut self,
// view: &mut V,
// cx: &mut LayoutContext<V>,
// ) -> Result<(NodeId, Self::Layout)> {
// unimplemented!()
// }
// fn paint(&mut self, layout: Layout<()>, view: &mut V, cx: &mut PaintContext<V>) -> Result<()> {
// unimplemented!()
// }
// }