Struct lib_ruby_parser::nodes::FindPattern[][src]

pub struct FindPattern {
    pub elements: Vec<Node>,
    pub begin_l: Option<Range>,
    pub end_l: Option<Range>,
    pub expression_l: Range,
}

Represents a find pattern using in pattern matching (i.e. in [*x, 1 => a, *y])

It's different from ArrayPattern/ConstPattern because it supports multiple wildcard pattern

Fields

elements: Vec<Node>

Inner part of the find pattern

begin_l: Option<Range>

Location of the begin

case foo; in [*x, 1 => a, *y]; end
             ~

None if there are no brackets/parentheses

end_l: Option<Range>

Location of the end

case foo; in [*x, 1 => a, *y]; end
                            ~

None if there are no brackets/parentheses

expression_l: Range

Location of the full expression

case foo; in [*x, 1 => a, *y]; end
             ~~~~~~~~~~~~~~~~

Trait Implementations

impl Clone for FindPattern[src]

impl Debug for FindPattern[src]

impl PartialEq<FindPattern> for FindPattern[src]

impl StructuralPartialEq for FindPattern[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.