Skip to main content

lys_module

Struct lys_module 

Source
#[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

Source

pub fn version(&self) -> u8

Source

pub fn set_version(&mut self, val: u8)

Source

pub unsafe fn version_raw(this: *const Self) -> u8

Source

pub unsafe fn set_version_raw(this: *mut Self, val: u8)

Source

pub fn latest_revision(&self) -> u8

Source

pub fn set_latest_revision(&mut self, val: u8)

Source

pub unsafe fn latest_revision_raw(this: *const Self) -> u8

Source

pub unsafe fn set_latest_revision_raw(this: *mut Self, val: u8)

Source

pub fn new_bitfield_1( version: u8, latest_revision: u8, ) -> __BindgenBitfieldUnit<[u8; 1]>

Trait Implementations§

Source§

impl Clone for lys_module

Source§

fn clone(&self) -> lys_module

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for lys_module

Source§

impl Debug for lys_module

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for lys_module

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.