Skip to main content

lysp_type

Struct lysp_type 

Source
#[repr(C)]
pub struct lysp_type {
Show 15 fields pub name: *const c_char, pub range: *mut lysp_restr, pub length: *mut lysp_restr, pub patterns: *mut lysp_restr, pub enums: *mut lysp_type_enum, pub bits: *mut lysp_type_enum, pub path: *mut lyxp_expr, pub bases: *mut *const c_char, pub types: *mut lysp_type, pub exts: *mut lysp_ext_instance, pub pmod: *const lysp_module, pub compiled: *mut lysc_type, pub fraction_digits: u8, pub require_instance: u8, pub flags: u16,
}
Expand description

@brief YANG type-stmt

Some of the items in the structure may be mandatory, but it is necessary to resolve the type’s base type first

Fields§

§name: *const c_char

< name of the type (mandatory)

§range: *mut lysp_restr

< allowed values range - numerical, decimal64

§length: *mut lysp_restr

< allowed length of the value - string, binary

§patterns: *mut lysp_restr

< list of patterns ([sized array](@ref sizedarrays)) - string

§enums: *mut lysp_type_enum

< list of enum-stmts ([sized array](@ref sizedarrays)) - enum

§bits: *mut lysp_type_enum

< list of bit-stmts ([sized array](@ref sizedarrays)) - bits

§path: *mut lyxp_expr

< parsed path - leafref

§bases: *mut *const c_char

< list of base identifiers ([sized array](@ref sizedarrays)) - identityref

§types: *mut lysp_type

< list of sub-types ([sized array](@ref sizedarrays)) - union

§exts: *mut lysp_ext_instance

< list of the extension instances ([sized array](@ref sizedarrays))

§pmod: *const lysp_module

< (sub)module where the type is defined (needed for deviations)

§compiled: *mut lysc_type

< pointer to the compiled custom type, not used for built-in types

§fraction_digits: u8

< number of fraction digits - decimal64

§require_instance: u8

< require-instance flag - leafref, instance

§flags: u16

< [schema node flags](@ref spnodeflags)

Trait Implementations§

Source§

impl Clone for lysp_type

Source§

fn clone(&self) -> lysp_type

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 lysp_type

Source§

impl Debug for lysp_type

Source§

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

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

impl Default for lysp_type

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.