Struct lib_ruby_parser::nodes::Rescue[][src]

pub struct Rescue {
    pub body: Option<Box<Node>>,
    pub rescue_bodies: Vec<Node>,
    pub else_: Option<Box<Node>>,
    pub else_l: Option<Range>,
    pub expression_l: Range,
}

Represents a rescue block

Fields

body: Option<Box<Node>>

Body of the block that is wrapped into rescue (i.e. the part that may throw an error)

rescue_bodies: Vec<Node>

A list of rescue handlers (see RescueBody node)

else_: Option<Box<Node>>

Else branch.

None if there's no else branch

else_l: Option<Range>

Location of the else keyword

begin; 1; rescue StandardError => e; 2; else; 3; end
                                        ~~~~

None if there's no else branch

expression_l: Range

Location of the full expression

begin; 1; rescue StandardError => e; 2; else; 3; end
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Note: begin/end keywords belong to KwBegin node

Trait Implementations

impl Clone for Rescue[src]

impl Debug for Rescue[src]

impl PartialEq<Rescue> for Rescue[src]

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