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
sourceimpl Clone for ConstPattern
impl Clone for ConstPattern
sourcefn clone(&self) -> ConstPattern
fn clone(&self) -> ConstPattern
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ConstPattern
impl Debug for ConstPattern
sourceimpl PartialEq<ConstPattern> for ConstPattern
impl PartialEq<ConstPattern> for ConstPattern
sourcefn eq(&self, other: &ConstPattern) -> bool
fn eq(&self, other: &ConstPattern) -> bool
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
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