Struct yang3::schema::SchemaModule
source · pub struct SchemaModule<'a> { /* private fields */ }Expand description
Available YANG schema tree structures representing YANG module.
Implementations§
source§impl<'a> SchemaModule<'a>
impl<'a> SchemaModule<'a>
sourcepub fn organization(&self) -> Option<&str>
pub fn organization(&self) -> Option<&str>
Party/company responsible for the module.
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Description of the module.
sourcepub fn set_implemented(&self) -> Result<(), Error>
pub fn set_implemented(&self) -> Result<(), Error>
Make the specific module implemented.
sourcepub fn is_implemented(&self) -> bool
pub fn is_implemented(&self) -> bool
Return true if the module is implemented, not just imported.
sourcepub fn feature_value(&self, feature: &str) -> Result<bool, Error>
pub fn feature_value(&self, feature: &str) -> Result<bool, Error>
Get the current real status of the specified feature in the module.
sourcepub fn print_file<F: AsRawFd>(
&self,
fd: F,
format: SchemaOutputFormat,
options: SchemaPrinterFlags,
) -> Result<(), Error>
pub fn print_file<F: AsRawFd>( &self, fd: F, format: SchemaOutputFormat, options: SchemaPrinterFlags, ) -> Result<(), Error>
Print schema tree in the specified format into a file descriptor.
sourcepub fn print_string(
&self,
format: SchemaOutputFormat,
options: SchemaPrinterFlags,
) -> Result<String, Error>
pub fn print_string( &self, format: SchemaOutputFormat, options: SchemaPrinterFlags, ) -> Result<String, Error>
Print schema tree in the specified format into a string.
sourcepub fn data(&self) -> Siblings<'a, SchemaNode<'a>> ⓘ
pub fn data(&self) -> Siblings<'a, SchemaNode<'a>> ⓘ
Returns an iterator over the top-level data nodes.
sourcepub fn rpcs(&self) -> Siblings<'a, SchemaNode<'a>> ⓘ
pub fn rpcs(&self) -> Siblings<'a, SchemaNode<'a>> ⓘ
Returns an iterator over the list of RPCs.
sourcepub fn notifications(&self) -> Siblings<'a, SchemaNode<'a>> ⓘ
pub fn notifications(&self) -> Siblings<'a, SchemaNode<'a>> ⓘ
Returns an iterator over the list of notifications.
sourcepub fn extensions(&self) -> impl Iterator<Item = SchemaExtInstance<'a>>
pub fn extensions(&self) -> impl Iterator<Item = SchemaExtInstance<'a>>
Returns an iterator over the list of extension instances.
sourcepub fn top_level_nodes(
&self,
flags: IterSchemaFlags,
) -> impl Iterator<Item = SchemaNode<'a>>
pub fn top_level_nodes( &self, flags: IterSchemaFlags, ) -> impl Iterator<Item = SchemaNode<'a>>
Returns an iterator over the top-level data nodes. The iteration
behavior is customizable using the provided flags option.
sourcepub fn traverse(&self) -> impl Iterator<Item = SchemaNode<'a>>
pub fn traverse(&self) -> impl Iterator<Item = SchemaNode<'a>>
Returns an iterator over all data nodes in the schema module (depth-first search algorithm).
NOTE: augmentations (from other modules or from the module itself) are also iterated over.
Trait Implementations§
source§impl<'a> Binding<'a> for SchemaModule<'a>
impl<'a> Binding<'a> for SchemaModule<'a>
type CType = lys_module
type Container = Context
unsafe fn from_raw( context: &'a Context, raw: *mut lys_module, ) -> SchemaModule<'_>
unsafe fn from_raw_opt( container: &'a Self::Container, raw: *mut Self::CType, ) -> Option<Self>
source§impl<'a> Clone for SchemaModule<'a>
impl<'a> Clone for SchemaModule<'a>
source§fn clone(&self) -> SchemaModule<'a>
fn clone(&self) -> SchemaModule<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl<'a> Debug for SchemaModule<'a>
impl<'a> Debug for SchemaModule<'a>
source§impl<'a> PartialEq for SchemaModule<'a>
impl<'a> PartialEq for SchemaModule<'a>
impl Send for SchemaModule<'_>
impl Sync for SchemaModule<'_>
Auto Trait Implementations§
impl<'a> Freeze for SchemaModule<'a>
impl<'a> RefUnwindSafe for SchemaModule<'a>
impl<'a> Unpin for SchemaModule<'a>
impl<'a> UnwindSafe for SchemaModule<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)