Skip to main content

lyd_merge_module

Function lyd_merge_module 

Source
pub unsafe extern "C" fn lyd_merge_module(
    target: *mut *mut lyd_node,
    source: *const lyd_node,
    mod_: *const lys_module,
    merge_cb: lyd_merge_cb,
    cb_data: *mut c_void,
    options: u16,
) -> Type
Expand description

@brief Merge all the nodes of a module from source data tree into the target data tree. Merge may not be complete until validation called on the resulting data tree (data from more cases may be present, default and non-default values).

@param[in,out] target Target data tree to merge into, must be a top-level tree. Always points to the first sibling. @param[in] source Source data tree to merge, must be a top-level tree. @param[in] mod Module, whose source data only to consider, NULL for all modules. @param[in] merge_cb Optional merge callback that will be called for every merged node, before merging its descendants. If a subtree is being added into target (no matching node found), callback is called only once with the subtree root. @param[in] cb_data Arbitrary callback data. @param[in] options Bitmask of option flags, see @ref mergeoptions. @return LY_SUCCESS on success, @return LY_ERR value on error.