pub type lyplg_ext_compile_clb = Option<unsafe extern "C" fn(cctx: *mut lysc_ctx, extp: *const lysp_ext_instance, ext: *mut lysc_ext_instance) -> Type>;Expand description
@brief Callback to compile extension from the lysp_ext_instance to the lysc_ext_instance. The later structure is generally prepared and only the extension specific data are supposed to be added (if any).
The parsed generic statements can be processed by the callback on its own or the ::lyplg_ext_compile_extension_instance() function can be used to let the compilation to libyang following the standard rules for processing the YANG statements.
@param[in] cctx Current compile context. @param[in] extp Parsed extension instance data. @param[in,out] ext Prepared compiled extension instance structure where an addition, extension-specific, data are supposed to be placed for later use (data validation or use of external tool). @return LY_SUCCESS in case of success. @return LY_ENOT in case the extension instance is not supported and should be removed. @return LY_ERR error on error.
Aliased Type§
pub enum lyplg_ext_compile_clb {
None,
Some(unsafe extern "C" fn(*mut lysc_ctx, *const lysp_ext_instance, *mut lysc_ext_instance) -> u32),
}Variants§
None
No value.
Some(unsafe extern "C" fn(*mut lysc_ctx, *const lysp_ext_instance, *mut lysc_ext_instance) -> u32)
Some value of type T.