Struct lib_ruby_parser::nodes::MatchVar
source · [−]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 RefUnwindSafe for MatchVar
impl Send for MatchVar
impl Sync for MatchVar
impl Unpin for MatchVar
impl UnwindSafe for MatchVar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more