hello/hello.rs
1#![feature(type_alias_impl_trait, impl_trait_in_assoc_type)]
2
3use nuit::{Text, VStack, View, Bind};
4
5#[derive(Bind)]
6struct HelloView;
7
8impl View for HelloView {
9 type Body = impl View;
10
11 fn body(&self) -> Self::Body {
12 VStack::new((
13 Text::new("Hello"),
14 Text::new("World"),
15 ))
16 }
17}
18
19fn main() {
20 nuit::run_app(HelloView);
21}