Struct lib_ruby_parser::nodes::ConstPattern [−][src]
#[repr(C)]pub struct ConstPattern { pub const_: Box<Node>, pub pattern: Box<Node>, pub begin_l: Loc, pub end_l: Loc, pub expression_l: Loc, }
Expand description
Const pattern used in pattern matching (e.g. in A(1, 2))
Fields
const_: Box<Node>Constant that is used, Const("Foo") for in For(42)
pattern: Box<Node>Inner part of the constant pattern
ArrayPattern(vec![ Int("1") ]) for Foo(1)
begin_l: LocLocation of the open parenthesis
case 1; in Foo(42); end
~
end_l: LocLocation of the closing parenthesis
case 1; in Foo(42); end
~
expression_l: LocLocation of the full expression
case 1; in Foo(42); end
~~~~~~~
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for ConstPatternimpl Send for ConstPatternimpl Sync for ConstPatternimpl Unpin for ConstPatternimpl UnwindSafe for ConstPatternBlanket Implementations
Mutably borrows from an owned value. Read more