[][src]Struct lib_ruby_parser::nodes::Optarg

pub struct Optarg {
    pub name: String,
    pub default: Node,
    pub name_l: Range,
    pub operator_l: Range,
    pub expression_l: Range,
}

Represents optional positional argument (i.e. foo in m(foo = 1))

Fields

name: String

Name of the argument

default: Node

Default value of the argument

name_l: Range

Location of the argument name

def m(foo = 1); end
      ~~~
operator_l: Range

Location of the = operator

def m(foo = 1); end
          ~
expression_l: Range

Location of the full expression

def m(foo = 1); end
      ~~~~~~~

Trait Implementations

impl Clone for Optarg[src]

impl Debug for Optarg[src]

impl PartialEq<Optarg> for Optarg[src]

impl StructuralPartialEq for Optarg[src]

Auto Trait Implementations

impl RefUnwindSafe for Optarg

impl Send for Optarg

impl Sync for Optarg

impl Unpin for Optarg

impl UnwindSafe for Optarg

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.