[][src]Function mt_dom::diff_with_key

pub fn diff_with_key<'a, 'b, TAG, NS, ATT, VAL, EVENT, MSG>(
    old: &'a Node<TAG, NS, ATT, VAL, EVENT, MSG>,
    new: &'a Node<TAG, NS, ATT, VAL, EVENT, MSG>,
    key: &ATT
) -> Vec<Patch<'a, TAG, NS, ATT, VAL, EVENT, MSG>> where
    TAG: PartialEq,
    ATT: PartialEq,
    NS: PartialEq,
    VAL: PartialEq

calculate the difference of 2 nodes the supplied key will be taken into account that if the 2 keys differ, the element will be replaced without having to traverse the children nodes