pub struct LeafStmt { /* private fields */ }Expand description
The “leaf” Statement.
Implementations§
Source§impl LeafStmt
impl LeafStmt
pub fn arg(&self) -> &Identifier
pub fn when(&self) -> &Option<WhenStmt>
pub fn if_feature(&self) -> &Vec<IfFeatureStmt>
pub fn type_(&self) -> &TypeStmt
pub fn units(&self) -> &Option<UnitsStmt>
pub fn must(&self) -> &Vec<MustStmt>
pub fn default(&self) -> &Option<DefaultStmt>
pub fn config(&self) -> &Option<ConfigStmt>
pub fn mandatory(&self) -> &Option<MandatoryStmt>
pub fn status(&self) -> &Option<StatusStmt>
pub fn description(&self) -> &Option<DescriptionStmt>
pub fn reference(&self) -> &Option<ReferenceStmt>
Trait Implementations§
Source§impl Stmt for LeafStmt
impl Stmt for LeafStmt
Source§type Arg = Identifier
type Arg = Identifier
Arg type.
Source§type SubStmts = (Option<WhenStmt>, Vec<IfFeatureStmt>, TypeStmt, Option<UnitsStmt>, Vec<MustStmt>, Option<DefaultStmt>, Option<ConfigStmt>, Option<MandatoryStmt>, Option<StatusStmt>, Option<DescriptionStmt>, Option<ReferenceStmt>)
type SubStmts = (Option<WhenStmt>, Vec<IfFeatureStmt>, TypeStmt, Option<UnitsStmt>, Vec<MustStmt>, Option<DefaultStmt>, Option<ConfigStmt>, Option<MandatoryStmt>, Option<StatusStmt>, Option<DescriptionStmt>, Option<ReferenceStmt>)
Sub Statements.
Source§fn has_substmts() -> bool
fn has_substmts() -> bool
Return true if this statement has substatements.
Source§fn substmts_def() -> Vec<SubStmtDef>
fn substmts_def() -> Vec<SubStmtDef>
Return substatements definition.
Source§fn new_with_substmts(arg: Self::Arg, substmts: Self::SubStmts) -> YangStmtwhere
Self: Sized,
fn new_with_substmts(arg: Self::Arg, substmts: Self::SubStmts) -> YangStmtwhere
Self: Sized,
Constructor with tuple of substatements. Panic if it is not defined.
Source§fn parse_substmts(parser: &mut Parser) -> Result<Self::SubStmts, YangError>
fn parse_substmts(parser: &mut Parser) -> Result<Self::SubStmts, YangError>
Parse substatements.
Source§fn opt_substmts() -> bool
fn opt_substmts() -> bool
Return true if this statement has sub-statements optionally.
impl StructuralPartialEq for LeafStmt
Auto Trait Implementations§
impl Freeze for LeafStmt
impl RefUnwindSafe for LeafStmt
impl Send for LeafStmt
impl Sync for LeafStmt
impl Unpin for LeafStmt
impl UnwindSafe for LeafStmt
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
Mutably borrows from an owned value. Read more