pub unsafe extern "C" fn lyd_diff_merge_module(
diff: *mut *mut lyd_node,
src_diff: *const lyd_node,
mod_: *const lys_module,
diff_cb: lyd_diff_cb,
cb_data: *mut c_void,
options: u16,
) -> TypeExpand description
@brief Merge 2 diffs into each other but restrict the operation to one module.
The diffs must be possible to be merged, which is guaranteed only if the source diff was created on data that had the target diff applied on them. In other words, this sequence is legal
- get diff1 from data1 and data2 -> get data11 from apply diff1 on data1 -> get diff2 from data11 and data3 -> -> get data 33 from apply diff2 on data1
and reusing these diffs
- get diff11 from merge diff1 and diff2 -> get data33 from apply diff11 on data1
@param[in,out] diff Target diff to merge into. @param[in] src_diff Source diff. @param[in] mod Module, whose diff only to consider, NULL for all modules. @param[in] diff_cb Optional diff callback that will be called for every merged node. Param @p diff_node is the source diff node while @p data_node is the updated target diff node. In case a whole subtree is added, the callback is called on the root with @p diff_node being NULL. @param[in] cb_data Arbitrary callback data. @param[in] options Bitmask of options flags, see @ref diffmergeoptions. @return LY_SUCCESS on success, @return LY_ERR on error.