Add a derive macro for Element

To turn any struct into a composite element, you can implement a render method
with the following signature:

fn render<V: View>(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> AnyElement<V>;

Then add #[derive(Element)] to the struct definition.

This will make it easier to introduce higher-level components that are expressed in
terms of other elements.
bede668b14Nathan Sobo committed on 6/25/2023, 1:51:50 PMparent82bd5fb
3 files changedLine totals unavailable