pub enum StmtKind {
QueryDef(Box<QueryDef>),
VarDef(VarDef),
TypeDef(TypeDef),
ModuleDef(ModuleDef),
}
Variants§
Implementations§
source§impl StmtKind
impl StmtKind
sourcepub fn is_query_def(&self) -> bool
pub fn is_query_def(&self) -> bool
Returns true if this is a StmtKind::QueryDef
, otherwise false
sourcepub fn as_query_def_mut(&mut self) -> Option<&mut Box<QueryDef>>
pub fn as_query_def_mut(&mut self) -> Option<&mut Box<QueryDef>>
Optionally returns mutable references to the inner fields if this is a StmtKind::QueryDef
, otherwise None
sourcepub fn as_query_def(&self) -> Option<&Box<QueryDef>>
pub fn as_query_def(&self) -> Option<&Box<QueryDef>>
Optionally returns references to the inner fields if this is a StmtKind::QueryDef
, otherwise None
sourcepub fn into_query_def(self) -> Result<Box<QueryDef>, Self>
pub fn into_query_def(self) -> Result<Box<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 is_var_def(&self) -> bool
pub fn is_var_def(&self) -> bool
Returns true if this is a StmtKind::VarDef
, otherwise false
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 is_type_def(&self) -> bool
pub fn is_type_def(&self) -> bool
Returns true if this is a StmtKind::TypeDef
, otherwise false
sourcepub fn as_type_def_mut(&mut self) -> Option<&mut TypeDef>
pub fn as_type_def_mut(&mut self) -> Option<&mut TypeDef>
Optionally returns mutable references to the inner fields if this is a StmtKind::TypeDef
, otherwise None
sourcepub fn as_type_def(&self) -> Option<&TypeDef>
pub fn as_type_def(&self) -> Option<&TypeDef>
Optionally returns references to the inner fields if this is a StmtKind::TypeDef
, otherwise None
sourcepub fn into_type_def(self) -> Result<TypeDef, Self>
pub fn into_type_def(self) -> Result<TypeDef, Self>
Returns the inner fields if this is a StmtKind::TypeDef
, otherwise returns back the enum in the Err
case of the result
sourcepub fn is_module_def(&self) -> bool
pub fn is_module_def(&self) -> bool
Returns true if this is a StmtKind::ModuleDef
, otherwise false
sourcepub fn as_module_def_mut(&mut self) -> Option<&mut ModuleDef>
pub fn as_module_def_mut(&mut self) -> Option<&mut ModuleDef>
Optionally returns mutable references to the inner fields if this is a StmtKind::ModuleDef
, otherwise None
sourcepub fn as_module_def(&self) -> Option<&ModuleDef>
pub fn as_module_def(&self) -> Option<&ModuleDef>
Optionally returns references to the inner fields if this is a StmtKind::ModuleDef
, otherwise None
sourcepub fn into_module_def(self) -> Result<ModuleDef, Self>
pub fn into_module_def(self) -> Result<ModuleDef, Self>
Returns the inner fields if this is a StmtKind::ModuleDef
, otherwise returns back the enum in the Err
case of the result