nusa 0.1.9

web-frontend features for kagura
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{HtmlPrefab, VNode};
use kagura::node::{NodeCmd, RenderNode, UpdateNode};
use std::collections::VecDeque;

pub mod basic_html_node;

pub use basic_html_node::BasicHtmlNode;

pub trait HtmlNode: RenderNode<(VecDeque<VNode>, NodeCmd)> + UpdateNode {
    fn is(&self, prefab: &dyn HtmlPrefab) -> bool;
    fn on_assemble(&mut self) -> NodeCmd;
    fn update_by_prefab(&mut self, prefab: Box<dyn HtmlPrefab>) -> NodeCmd;
}