#[repr(C)]pub struct MatchVar {
pub name: String,
pub name_l: Loc,
pub expression_l: Loc,
}
Expand description
Represents matching with assignment into a local variable (i.e. pattern => var
)
Fields§
§name: String
Name of the variable that is assigned if matching succeeds
name_l: Loc
Location of the name
case foo; in pattern => bar; end
~~~
Note it can also be produced by a hash pattern
case foo; in { a: }; end
~
expression_l: Loc
Location of the full expression
case foo; in pattern => bar; end
~~~
Note it can also be produced by a hash pattern
case foo; in { a: }; end
~~
Trait Implementations§
impl StructuralPartialEq for MatchVar
Auto Trait Implementations§
impl Freeze for MatchVar
impl RefUnwindSafe for MatchVar
impl Send for MatchVar
impl Sync for MatchVar
impl Unpin for MatchVar
impl UnwindSafe for MatchVar
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