Struct lib_ruby_parser::nodes::Rescue [−][src]
#[repr(C)]pub struct Rescue { pub body: MaybePtr<Node>, pub rescue_bodies: List<Node>, pub else_: MaybePtr<Node>, pub else_l: MaybeLoc, pub expression_l: Loc, }
Represents a rescue block
Fields
body: MaybePtr<Node>Body of the block that is wrapped into rescue (i.e. the part that may throw an error)
rescue_bodies: List<Node>A list of rescue handlers (see RescueBody node)
else_: MaybePtr<Node>Else branch.
None if there’s no else branch
else_l: MaybeLocLocation of the else keyword
begin; 1; rescue StandardError => e; 2; else; 3; end
~~~~
None if there’s no else branch
expression_l: LocLocation 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
impl RefUnwindSafe for Rescue
impl Send for Rescue
impl Sync for Rescue
impl Unpin for Rescue
impl UnwindSafe for Rescue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,