Struct lib_ruby_parser::nodes::Procarg0[][src]

pub struct Procarg0 {
    pub args: Vec<Node>,
    pub begin_l: Option<Range>,
    pub end_l: Option<Range>,
    pub expression_l: Range,
}

Represents a sole block argument (e.g. |foo|)

Block that takes a single array argument automatically expands it. Adding trailing comma after block argument disables this behavior (and then the only argument is emitted as Arg).

Fields

args: Vec<Node>

Parts of the sole block argument.

proc { |(a, b)| } also counts as a sole argument, so this list may contain: 1. A single Arg node (for proc { |a| } case) 2. Multiple Arg nodes (for proc { |(a, b, c)| } case)

begin_l: Option<Range>

Location of the open parenthesis

proc { |(foo, bar)| }
        ~

None if there's only one argument

end_l: Option<Range>

Location of the open parenthesis

proc { |(foo, bar)| }
                 ~

None if there's only one argument

expression_l: Range

Location of the full expression

proc { |(foo, bar)| }
        ~~~~~~~~~~

Trait Implementations

impl Clone for Procarg0[src]

impl Debug for Procarg0[src]

impl PartialEq<Procarg0> for Procarg0[src]

impl StructuralPartialEq for Procarg0[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.