Variants§
Implementations§
source§impl StmtKind
impl StmtKind
sourcepub fn as_query_def_mut(&mut self) -> Option<&mut QueryDef>
pub fn as_query_def_mut(&mut self) -> Option<&mut QueryDef>
Optionally returns mutable references to the inner fields if this is a StmtKind::QueryDef
, otherwise None
sourcepub fn as_query_def(&self) -> Option<&QueryDef>
pub fn as_query_def(&self) -> Option<&QueryDef>
Optionally returns references to the inner fields if this is a StmtKind::QueryDef
, otherwise None
sourcepub fn into_query_def(self) -> Result<QueryDef, Self>
pub fn into_query_def(self) -> Result<QueryDef, Self>
Returns the inner fields if this is a StmtKind::QueryDef
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_func_def_mut(&mut self) -> Option<&mut FuncDef>
pub fn as_func_def_mut(&mut self) -> Option<&mut FuncDef>
Optionally returns mutable references to the inner fields if this is a StmtKind::FuncDef
, otherwise None
sourcepub fn as_func_def(&self) -> Option<&FuncDef>
pub fn as_func_def(&self) -> Option<&FuncDef>
Optionally returns references to the inner fields if this is a StmtKind::FuncDef
, otherwise None
sourcepub fn into_func_def(self) -> Result<FuncDef, Self>
pub fn into_func_def(self) -> Result<FuncDef, Self>
Returns the inner fields if this is a StmtKind::FuncDef
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_var_def_mut(&mut self) -> Option<&mut VarDef>
pub fn as_var_def_mut(&mut self) -> Option<&mut VarDef>
Optionally returns mutable references to the inner fields if this is a StmtKind::VarDef
, otherwise None
sourcepub fn as_var_def(&self) -> Option<&VarDef>
pub fn as_var_def(&self) -> Option<&VarDef>
Optionally returns references to the inner fields if this is a StmtKind::VarDef
, otherwise None
sourcepub fn into_var_def(self) -> Result<VarDef, Self>
pub fn into_var_def(self) -> Result<VarDef, Self>
Returns the inner fields if this is a StmtKind::VarDef
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_main_mut(&mut self) -> Option<&mut Box<Expr>>
pub fn as_main_mut(&mut self) -> Option<&mut Box<Expr>>
Optionally returns mutable references to the inner fields if this is a StmtKind::Main
, otherwise None