pub struct WhenStmt { /* private fields */ }Expand description
The “when” Statement.
Implementations§
Source§impl WhenStmt
impl WhenStmt
pub fn arg(&self) -> &String
pub fn description(&self) -> &Option<DescriptionStmt>
pub fn reference(&self) -> &Option<ReferenceStmt>
Trait Implementations§
Source§impl Stmt for WhenStmt
impl Stmt for WhenStmt
Source§type SubStmts = (Option<DescriptionStmt>, Option<ReferenceStmt>)
type SubStmts = (Option<DescriptionStmt>, Option<ReferenceStmt>)
Sub Statements.
Source§fn opt_substmts() -> bool
fn opt_substmts() -> bool
Return true if this statement has sub-statements optionally.
Source§fn substmts_def() -> Vec<SubStmtDef>
fn substmts_def() -> Vec<SubStmtDef>
Return substatements definition.
Source§fn new_with_arg(arg: Self::Arg) -> YangStmtwhere
Self: Sized,
fn new_with_arg(arg: Self::Arg) -> YangStmtwhere
Self: Sized,
Constructor with a single arg. Panic if it is not defined.
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 has_substmts() -> bool
fn has_substmts() -> bool
Return true if this statement has sub-statements.
impl StructuralPartialEq for WhenStmt
Auto Trait Implementations§
impl Freeze for WhenStmt
impl RefUnwindSafe for WhenStmt
impl Send for WhenStmt
impl Sync for WhenStmt
impl Unpin for WhenStmt
impl UnwindSafe for WhenStmt
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