Struct lib_ruby_parser::nodes::ConstPattern
source · #[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: Loc
Location of the open parenthesis
case 1; in Foo(42); end
~
end_l: Loc
Location of the closing parenthesis
case 1; in Foo(42); end
~
expression_l: Loc
Location of the full expression
case 1; in Foo(42); end
~~~~~~~
Trait Implementations§
source§impl Clone for ConstPattern
impl Clone for ConstPattern
source§fn clone(&self) -> ConstPattern
fn clone(&self) -> ConstPattern
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ConstPattern
impl Debug for ConstPattern
source§impl PartialEq<ConstPattern> for ConstPattern
impl PartialEq<ConstPattern> for ConstPattern
source§fn eq(&self, other: &ConstPattern) -> bool
fn eq(&self, other: &ConstPattern) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ConstPattern
Auto Trait Implementations§
impl RefUnwindSafe for ConstPattern
impl Send for ConstPattern
impl Sync for ConstPattern
impl Unpin for ConstPattern
impl UnwindSafe for ConstPattern
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