[][src]Function mt_dom::diff::diff_with_key

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

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