#[repr(C)]pub struct lys_module {Show 22 fields
pub ctx: *mut ly_ctx,
pub name: *const c_char,
pub revision: *const c_char,
pub ns: *const c_char,
pub prefix: *const c_char,
pub filepath: *const c_char,
pub org: *const c_char,
pub contact: *const c_char,
pub dsc: *const c_char,
pub ref_: *const c_char,
pub parsed: *mut lysp_module,
pub compiled: *mut lysc_module,
pub extensions: *mut lysc_ext,
pub identities: *mut lysc_ident,
pub submodules: *mut lysc_submodule,
pub augmented_by: *mut *mut lys_module,
pub deviated_by: *mut *mut lys_module,
pub implemented: ly_bool,
pub to_compile: ly_bool,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1]>,
pub __bindgen_padding_0: [u8; 5],
}Expand description
@brief Available YANG schema tree structures representing YANG module.
Fields§
§ctx: *mut ly_ctx< libyang context of the module (mandatory)
name: *const c_char< name of the module (mandatory)
revision: *const c_char< revision of the module (if present)
ns: *const c_char< namespace of the module (module - mandatory)
prefix: *const c_char< module prefix or submodule belongsto prefix of main module (mandatory)
filepath: *const c_char< path, if the schema was read from a file, NULL in case of reading from memory
org: *const c_char< party/company responsible for the module
contact: *const c_char< contact information for the module
dsc: *const c_char< description of the module
ref_: *const c_char< cross-reference for the module
parsed: *mut lysp_module< Simply parsed (unresolved) YANG schema tree
compiled: *mut lysc_module< Compiled and fully validated YANG schema tree for data parsing. Available only for implemented modules.
extensions: *mut lysc_ext< List of compiled extension statements ([sized array](@ref sizedarrays)), filled even if module not implemented.
identities: *mut lysc_ident< List of compiled identities of the module ([sized array](@ref sizedarrays)) also contains the disabled identities when their if-feature(s) are evaluated to "false", and also the list is filled even if the module is not implemented. The list is located here because it avoids problems when the module became implemented in future (no matter if implicitly via augment/deviate or explicitly via ::lys_set_implemented()). Note that if the module is not implemented (compiled), the identities cannot be instantiated in data (in identityrefs).
submodules: *mut lysc_submodule< List of all the submodules ([sized array](@ref sizedarrays))
augmented_by: *mut *mut lys_module< List of modules that augment this module ([sized array](@ref sizedarrays))
deviated_by: *mut *mut lys_module< List of modules that deviate this module ([sized array](@ref sizedarrays))
implemented: ly_bool< flag if the module is implemented, not just imported
to_compile: ly_bool< flag marking a module that was changed but not (re)compiled, see ::LY_CTX_EXPLICIT_COMPILE.
_bitfield_align_1: [u8; 0]§_bitfield_1: __BindgenBitfieldUnit<[u8; 1]>§__bindgen_padding_0: [u8; 5]Implementations§
Source§impl lys_module
impl lys_module
pub fn version(&self) -> u8
pub fn set_version(&mut self, val: u8)
pub unsafe fn version_raw(this: *const Self) -> u8
pub unsafe fn set_version_raw(this: *mut Self, val: u8)
pub fn latest_revision(&self) -> u8
pub fn set_latest_revision(&mut self, val: u8)
pub unsafe fn latest_revision_raw(this: *const Self) -> u8
pub unsafe fn set_latest_revision_raw(this: *mut Self, val: u8)
pub fn new_bitfield_1( version: u8, latest_revision: u8, ) -> __BindgenBitfieldUnit<[u8; 1]>
Trait Implementations§
Source§impl Clone for lys_module
impl Clone for lys_module
Source§fn clone(&self) -> lys_module
fn clone(&self) -> lys_module
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more