1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#![deny(warnings)] #![deny(clippy::all)] #![feature(type_alias_enum_variants)] pub mod dom; #[macro_use] pub mod html; pub mod svg; mod util; pub use dom::DomUpdater; pub use sauron_vdom::builder::Attribute; pub use sauron_vdom::Event; pub use util::*; pub type Node = sauron_vdom::Node<&'static str>; pub type Element = sauron_vdom::Element<&'static str>; pub type Patch<'a> = sauron_vdom::Patch<'a, &'static str>; pub use sauron_vdom::Text; pub trait Component: Widget { fn subscribe(&mut self, callback: Box<Fn()>); } pub trait Widget: View { fn update(&mut self); } pub trait View { fn view(&self) -> Node; }