pub trait View<T, A = ()> {
// Required methods
fn build(&mut self, cx: &mut BuildContext) -> Id;
fn rebuild(&mut self, cx: &mut BuildContext, old: &mut Self);
fn layout(&mut self, cx: &mut LayoutContext, id: Id);
fn paint(&mut self, taffy: &Taffy, canvas: &mut Canvas);
fn message(
&mut self,
state: &mut T,
id_path: &[Id],
message: &dyn Any
) -> Option<A>;
}