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: LocLocation 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: LocLocation 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 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl 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
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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