pub enum ExprKind {
Pointer(Pointer),
Literal(Literal),
Call(Box<Call>),
Function(Box<Function>),
Tuple(Vec<TupleField>),
Array(Vec<Expr>),
EnumVariant(Box<EnumVariant>),
EnumEq(Box<EnumEq>),
EnumUnwrap(Box<EnumUnwrap>),
TupleLookup(Box<TupleLookup>),
Binding(Box<Binding>),
Switch(Vec<SwitchBranch>),
}Variants§
Pointer(Pointer)
Literal(Literal)
Call(Box<Call>)
Function(Box<Function>)
Tuple(Vec<TupleField>)
Array(Vec<Expr>)
EnumVariant(Box<EnumVariant>)
EnumEq(Box<EnumEq>)
EnumUnwrap(Box<EnumUnwrap>)
TupleLookup(Box<TupleLookup>)
Binding(Box<Binding>)
Switch(Vec<SwitchBranch>)
Implementations§
Source§impl ExprKind
impl ExprKind
Sourcepub fn is_pointer(&self) -> bool
pub fn is_pointer(&self) -> bool
Returns true if this is a ExprKind::Pointer, otherwise false
Sourcepub fn as_pointer_mut(&mut self) -> Option<&mut Pointer>
pub fn as_pointer_mut(&mut self) -> Option<&mut Pointer>
Optionally returns mutable references to the inner fields if this is a ExprKind::Pointer, otherwise None
Sourcepub fn as_pointer(&self) -> Option<&Pointer>
pub fn as_pointer(&self) -> Option<&Pointer>
Optionally returns references to the inner fields if this is a ExprKind::Pointer, otherwise None
Sourcepub fn into_pointer(self) -> Result<Pointer, Self>
pub fn into_pointer(self) -> Result<Pointer, Self>
Returns the inner fields if this is a ExprKind::Pointer, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_literal(&self) -> bool
pub fn is_literal(&self) -> bool
Returns true if this is a ExprKind::Literal, otherwise false
Sourcepub fn as_literal_mut(&mut self) -> Option<&mut Literal>
pub fn as_literal_mut(&mut self) -> Option<&mut Literal>
Optionally returns mutable references to the inner fields if this is a ExprKind::Literal, otherwise None
Sourcepub fn as_literal(&self) -> Option<&Literal>
pub fn as_literal(&self) -> Option<&Literal>
Optionally returns references to the inner fields if this is a ExprKind::Literal, otherwise None
Sourcepub fn into_literal(self) -> Result<Literal, Self>
pub fn into_literal(self) -> Result<Literal, Self>
Returns the inner fields if this is a ExprKind::Literal, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_call_mut(&mut self) -> Option<&mut Box<Call>>
pub fn as_call_mut(&mut self) -> Option<&mut Box<Call>>
Optionally returns mutable references to the inner fields if this is a ExprKind::Call, otherwise None
Sourcepub fn as_call(&self) -> Option<&Box<Call>>
pub fn as_call(&self) -> Option<&Box<Call>>
Optionally returns references to the inner fields if this is a ExprKind::Call, otherwise None
Sourcepub fn into_call(self) -> Result<Box<Call>, Self>
pub fn into_call(self) -> Result<Box<Call>, Self>
Returns the inner fields if this is a ExprKind::Call, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Returns true if this is a ExprKind::Function, otherwise false
Sourcepub fn as_function_mut(&mut self) -> Option<&mut Box<Function>>
pub fn as_function_mut(&mut self) -> Option<&mut Box<Function>>
Optionally returns mutable references to the inner fields if this is a ExprKind::Function, otherwise None
Sourcepub fn as_function(&self) -> Option<&Box<Function>>
pub fn as_function(&self) -> Option<&Box<Function>>
Optionally returns references to the inner fields if this is a ExprKind::Function, otherwise None
Sourcepub fn into_function(self) -> Result<Box<Function>, Self>
pub fn into_function(self) -> Result<Box<Function>, Self>
Returns the inner fields if this is a ExprKind::Function, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_tuple_mut(&mut self) -> Option<&mut Vec<TupleField>>
pub fn as_tuple_mut(&mut self) -> Option<&mut Vec<TupleField>>
Optionally returns mutable references to the inner fields if this is a ExprKind::Tuple, otherwise None
Sourcepub fn as_tuple(&self) -> Option<&Vec<TupleField>>
pub fn as_tuple(&self) -> Option<&Vec<TupleField>>
Optionally returns references to the inner fields if this is a ExprKind::Tuple, otherwise None
Sourcepub fn into_tuple(self) -> Result<Vec<TupleField>, Self>
pub fn into_tuple(self) -> Result<Vec<TupleField>, Self>
Returns the inner fields if this is a ExprKind::Tuple, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_array_mut(&mut self) -> Option<&mut Vec<Expr>>
pub fn as_array_mut(&mut self) -> Option<&mut Vec<Expr>>
Optionally returns mutable references to the inner fields if this is a ExprKind::Array, otherwise None
Sourcepub fn as_array(&self) -> Option<&Vec<Expr>>
pub fn as_array(&self) -> Option<&Vec<Expr>>
Optionally returns references to the inner fields if this is a ExprKind::Array, otherwise None
Sourcepub fn into_array(self) -> Result<Vec<Expr>, Self>
pub fn into_array(self) -> Result<Vec<Expr>, Self>
Returns the inner fields if this is a ExprKind::Array, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_enum_variant(&self) -> bool
pub fn is_enum_variant(&self) -> bool
Returns true if this is a ExprKind::EnumVariant, otherwise false
Sourcepub fn as_enum_variant_mut(&mut self) -> Option<&mut Box<EnumVariant>>
pub fn as_enum_variant_mut(&mut self) -> Option<&mut Box<EnumVariant>>
Optionally returns mutable references to the inner fields if this is a ExprKind::EnumVariant, otherwise None
Sourcepub fn as_enum_variant(&self) -> Option<&Box<EnumVariant>>
pub fn as_enum_variant(&self) -> Option<&Box<EnumVariant>>
Optionally returns references to the inner fields if this is a ExprKind::EnumVariant, otherwise None
Sourcepub fn into_enum_variant(self) -> Result<Box<EnumVariant>, Self>
pub fn into_enum_variant(self) -> Result<Box<EnumVariant>, Self>
Returns the inner fields if this is a ExprKind::EnumVariant, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_enum_eq(&self) -> bool
pub fn is_enum_eq(&self) -> bool
Returns true if this is a ExprKind::EnumEq, otherwise false
Sourcepub fn as_enum_eq_mut(&mut self) -> Option<&mut Box<EnumEq>>
pub fn as_enum_eq_mut(&mut self) -> Option<&mut Box<EnumEq>>
Optionally returns mutable references to the inner fields if this is a ExprKind::EnumEq, otherwise None
Sourcepub fn as_enum_eq(&self) -> Option<&Box<EnumEq>>
pub fn as_enum_eq(&self) -> Option<&Box<EnumEq>>
Optionally returns references to the inner fields if this is a ExprKind::EnumEq, otherwise None
Sourcepub fn into_enum_eq(self) -> Result<Box<EnumEq>, Self>
pub fn into_enum_eq(self) -> Result<Box<EnumEq>, Self>
Returns the inner fields if this is a ExprKind::EnumEq, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_enum_unwrap(&self) -> bool
pub fn is_enum_unwrap(&self) -> bool
Returns true if this is a ExprKind::EnumUnwrap, otherwise false
Sourcepub fn as_enum_unwrap_mut(&mut self) -> Option<&mut Box<EnumUnwrap>>
pub fn as_enum_unwrap_mut(&mut self) -> Option<&mut Box<EnumUnwrap>>
Optionally returns mutable references to the inner fields if this is a ExprKind::EnumUnwrap, otherwise None
Sourcepub fn as_enum_unwrap(&self) -> Option<&Box<EnumUnwrap>>
pub fn as_enum_unwrap(&self) -> Option<&Box<EnumUnwrap>>
Optionally returns references to the inner fields if this is a ExprKind::EnumUnwrap, otherwise None
Sourcepub fn into_enum_unwrap(self) -> Result<Box<EnumUnwrap>, Self>
pub fn into_enum_unwrap(self) -> Result<Box<EnumUnwrap>, Self>
Returns the inner fields if this is a ExprKind::EnumUnwrap, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_tuple_lookup(&self) -> bool
pub fn is_tuple_lookup(&self) -> bool
Returns true if this is a ExprKind::TupleLookup, otherwise false
Sourcepub fn as_tuple_lookup_mut(&mut self) -> Option<&mut Box<TupleLookup>>
pub fn as_tuple_lookup_mut(&mut self) -> Option<&mut Box<TupleLookup>>
Optionally returns mutable references to the inner fields if this is a ExprKind::TupleLookup, otherwise None
Sourcepub fn as_tuple_lookup(&self) -> Option<&Box<TupleLookup>>
pub fn as_tuple_lookup(&self) -> Option<&Box<TupleLookup>>
Optionally returns references to the inner fields if this is a ExprKind::TupleLookup, otherwise None
Sourcepub fn into_tuple_lookup(self) -> Result<Box<TupleLookup>, Self>
pub fn into_tuple_lookup(self) -> Result<Box<TupleLookup>, Self>
Returns the inner fields if this is a ExprKind::TupleLookup, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_binding(&self) -> bool
pub fn is_binding(&self) -> bool
Returns true if this is a ExprKind::Binding, otherwise false
Sourcepub fn as_binding_mut(&mut self) -> Option<&mut Box<Binding>>
pub fn as_binding_mut(&mut self) -> Option<&mut Box<Binding>>
Optionally returns mutable references to the inner fields if this is a ExprKind::Binding, otherwise None
Sourcepub fn as_binding(&self) -> Option<&Box<Binding>>
pub fn as_binding(&self) -> Option<&Box<Binding>>
Optionally returns references to the inner fields if this is a ExprKind::Binding, otherwise None
Sourcepub fn into_binding(self) -> Result<Box<Binding>, Self>
pub fn into_binding(self) -> Result<Box<Binding>, Self>
Returns the inner fields if this is a ExprKind::Binding, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_switch_mut(&mut self) -> Option<&mut Vec<SwitchBranch>>
pub fn as_switch_mut(&mut self) -> Option<&mut Vec<SwitchBranch>>
Optionally returns mutable references to the inner fields if this is a ExprKind::Switch, otherwise None
Sourcepub fn as_switch(&self) -> Option<&Vec<SwitchBranch>>
pub fn as_switch(&self) -> Option<&Vec<SwitchBranch>>
Optionally returns references to the inner fields if this is a ExprKind::Switch, otherwise None
Sourcepub fn into_switch(self) -> Result<Vec<SwitchBranch>, Self>
pub fn into_switch(self) -> Result<Vec<SwitchBranch>, Self>
Returns the inner fields if this is a ExprKind::Switch, otherwise returns back the enum in the Err case of the result