pub unsafe extern "C" fn lyd_validate_module(
tree: *mut *mut lyd_node,
module: *const lys_module,
val_opts: u32,
diff: *mut *mut lyd_node,
) -> TypeExpand description
@brief Fully validate a data tree of a module.
The data tree is modified in-place. As a result of the validation, some data might be removed from the tree. In that case, the removed items are freed, not just unlinked.
If several modules need to be validated, the flag ::LYD_VALIDATE_NOT_FINAL should be used first for validation of each module and then ::lyd_validate_module_final() should be called also for each module. Otherwise, false-positive validation errors for foreign dependencies may occur.
@param[in,out] tree Data tree to recursively validate. May be changed by validation, might become NULL. @param[in] module Module whose data (and schema restrictions) to validate. @param[in] val_opts Validation options (@ref datavalidationoptions). @param[out] diff Optional diff with any changes made by the validation. @return LY_SUCCESS on success. @return LY_ERR error on error.