Struct lib_ruby_parser::nodes::RescueBody
source · [−]#[repr(C)]pub struct RescueBody {
pub exc_list: Option<Box<Node>>,
pub exc_var: Option<Box<Node>>,
pub body: Option<Box<Node>>,
pub keyword_l: Loc,
pub assoc_l: Option<Loc>,
pub begin_l: Option<Loc>,
pub expression_l: Loc,
}
Expand description
Represents a single rescue
handler (i.e. rescue E => e ...
)
Fields
exc_list: Option<Box<Node>>
A list of exception classes
None
if no classes specified (i.e. rescue => e; ...
or just rescue; ...
)
exc_var: Option<Box<Node>>
Variable that captures exception
None
if no variable specified (i.e. rescue E; ...
or just rescue; ...
)
body: Option<Box<Node>>
Body of the handler
keyword_l: Loc
Location of the rescue
keyword
begin; 1; rescue E => e; 2; end
~~~~~~
assoc_l: Option<Loc>
Location of the =>
operator
begin; 1; rescue E => e; 2; end
~~
None
if exception is not captured.
begin_l: Option<Loc>
Location of the then
keyword
begin; 1; rescue E => e then; 2; end
~~~~
then
is optional, so begin_l
can be None
expression_l: Loc
Location of the full expression
begin; 1; rescue E => e then; 2; end
~~~~~~~~~~~~~~~~~~~~~
Trait Implementations
sourceimpl Clone for RescueBody
impl Clone for RescueBody
sourcefn clone(&self) -> RescueBody
fn clone(&self) -> RescueBody
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RescueBody
impl Debug for RescueBody
sourceimpl PartialEq<RescueBody> for RescueBody
impl PartialEq<RescueBody> for RescueBody
sourcefn eq(&self, other: &RescueBody) -> bool
fn eq(&self, other: &RescueBody) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RescueBody) -> bool
fn ne(&self, other: &RescueBody) -> bool
This method tests for !=
.
impl StructuralPartialEq for RescueBody
Auto Trait Implementations
impl RefUnwindSafe for RescueBody
impl Send for RescueBody
impl Sync for RescueBody
impl Unpin for RescueBody
impl UnwindSafe for RescueBody
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more