sauron_core/
vdom.rs

1//! vdom stands for virtual-dom.
2//! This module contains types that are derived from mt-dom
3//! where we assign concrete types into the generics.
4//!
5//! All the code in this module are run in purely rust environment, that is there is NO code here
6//! involves accessing the real DOM.
7//!
8use crate::dom::Event;
9pub use attribute::Attribute;
10pub use attribute::Callback;
11pub use attribute::GroupedAttributeValues;
12pub use element::Element;
13pub use leaf::Leaf;
14pub use templated_view::TemplatedView;
15
16mod attribute;
17mod element;
18mod leaf;
19mod map_msg;
20mod render;
21mod templated_view;
22
23pub use attribute::special::{
24    key, replace, skip, skip_criteria, KEY, REPLACE, SKIP, SKIP_CRITERIA,
25};
26#[cfg(feature = "ensure-attr-set")]
27pub(crate) use attribute::special::{CHECKED, DISABLED, OPEN, VALUE};
28pub use attribute::{attr, attr_ns, AttributeName, AttributeValue, Namespace, Style, Tag, Value};
29pub use diff::{diff, diff_recursive};
30pub use node::{element, element_ns, fragment, leaf, node_list, Node};
31pub use patch::{Patch, PatchType, TreePath};
32
33pub mod diff;
34mod diff_lis;
35mod node;
36pub mod patch;
37
38/// Callback where Event type is supplied
39/// for Components
40pub type EventCallback<MSG> = Callback<Event, MSG>;
41
42/// Mount callback is used for mounting the component into the DOM
43/// This requires no MSG to be emitted
44pub type ComponentEventCallback = Callback<Event, ()>;