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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#![deny(
    warnings,
    missing_docs,
    missing_debug_implementations,
    missing_copy_implementations,
    trivial_casts,
    trivial_numeric_casts,
    unstable_features,
    unused_import_braces
)]

//! mt-dom is a generic virtual dom implementation which doesn't specify the types of the data that
//! is being processed. It's up to the library user to specify those types
//!
//! The goal of this library is to provide virtual dom diffing functionality and return a portable
//! patches which the user can then use to apply those patches in their respective UI elements.
//!
//! mt-dom is not limited to be used in html base virtual-dom implementation, but can also be use
//! for native UI elements.
//!
pub use apply_patches::apply_patches;
pub use diff::diff_with_key;
pub use node::{
    attribute::{
        attr,
        attr_ns,
        group_attributes_per_name,
        merge_attributes_of_same_name,
        on,
        AttValue,
        Callback,
    },
    element,
    element_ns,
    text,
    Attribute,
    Element,
    Node,
};
pub use patch::{
    NodeIdx,
    Patch,
};

pub mod apply_patches;
pub mod diff;
mod node;
pub mod patch;