Function mt_dom::diff::increment_node_idx_to_descendant_count[][src]

pub fn increment_node_idx_to_descendant_count<NS, TAG, ATT, VAL, EVENT>(
    node: &Node<NS, TAG, ATT, VAL, EVENT>,
    cur_node_idx: &mut usize
) where
    NS: PartialEq + Clone + Debug,
    TAG: PartialEq + Clone + Debug,
    ATT: PartialEq + Clone + Debug,
    VAL: PartialEq + Clone + Debug,
    EVENT: PartialEq + Clone + Debug
Expand description

increment the cur_node_idx based on how many descendant it contains.

Note: This is not including the count of itself, since the node is being processed and the cur_node_idx is incremented in the loop together with its siblings TODO: this can be optimize by adding the children count and then descending into element node that has children only