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§
source§impl Clone for RescueBody
impl Clone for RescueBody
source§fn clone(&self) -> RescueBody
fn clone(&self) -> RescueBody
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RescueBody
impl Debug for RescueBody
source§impl PartialEq for RescueBody
impl PartialEq for RescueBody
source§fn 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 ==
.impl StructuralPartialEq for RescueBody
Auto Trait Implementations§
impl Freeze for RescueBody
impl RefUnwindSafe for RescueBody
impl Send for RescueBody
impl Sync for RescueBody
impl Unpin for RescueBody
impl UnwindSafe for RescueBody
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more