Struct lib_ruby_parser::nodes::ConstPattern [−][src]
#[repr(C)]pub struct ConstPattern { pub const_: Ptr<Node>, pub pattern: Ptr<Node>, pub begin_l: Loc, pub end_l: Loc, pub expression_l: Loc, }
Const pattern used in pattern matching (e.g. in A(1, 2))
Fields
const_: Ptr<Node>Constant that is used, Const("Foo") for in For(42)
pattern: Ptr<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
impl Clone for ConstPattern[src]
fn clone(&self) -> ConstPattern[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for ConstPattern[src]
impl PartialEq<ConstPattern> for ConstPattern[src]
fn eq(&self, other: &ConstPattern) -> bool[src]
fn ne(&self, other: &ConstPattern) -> bool[src]
impl StructuralPartialEq for ConstPattern[src]
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,