Type Alias Patch

Source
pub type Patch<'a, MSG> = Patch<'a, Widget, Event, MSG>;

Aliased Type§

pub enum Patch<'a, MSG> {
    AppendChildren(usize, Vec<&'a Node<Widget, Event, MSG>>),
    TruncateChildren(usize, usize),
    Replace(usize, &'a Node<Widget, Event, MSG>),
    AddAttributes(usize, Vec<Attribute<Event, MSG>>),
    RemoveAttributes(usize, Vec<&'static str>),
    AddEventListener(usize, Vec<&'a Attribute<Event, MSG>>),
    RemoveEventListener(usize, Vec<&'static str>),
    ChangeText(usize, &'a Text),
}

Variants§

§

AppendChildren(usize, Vec<&'a Node<Widget, Event, MSG>>)

Append a vector of child nodes to a parent node id.

§

TruncateChildren(usize, usize)

For a node_i32, remove all children besides the first len

§

Replace(usize, &'a Node<Widget, Event, MSG>)

Replace a node with another node. This typically happens when a node’s tag changes. ex:

becomes

§

AddAttributes(usize, Vec<Attribute<Event, MSG>>)

Add attributes that the new node has that the old node does not Note: the attributes is not a reference since attributes of same name are merged to produce a new unify attribute

§

RemoveAttributes(usize, Vec<&'static str>)

Remove attributes that the old node had that the new node doesn’t

§

AddEventListener(usize, Vec<&'a Attribute<Event, MSG>>)

Add attributes that the new node has that the old node does not

§

RemoveEventListener(usize, Vec<&'static str>)

Remove attributes that the old node had that the new node doesn’t

§

ChangeText(usize, &'a Text)

Change the text of a Text node.