Struct lib_ruby_parser::nodes::Ensure [−][src]
#[repr(C)]pub struct Ensure { pub body: Option<Box<Node>>, pub ensure: Option<Box<Node>>, pub keyword_l: Loc, pub expression_l: Loc, }
Expand description
Represents a block of code with ensure
(i.e. begin; ensure; end
)
Fields
body: Option<Box<Node>>
Block of code that is wrapped into ensure
Note: that’s the body of the ensure
block
Int("1")
for begin; 1; ensure; 2; end
ensure: Option<Box<Node>>
Body of the ensure
block
Int("2")
for begin; 1; ensure; 2; end
keyword_l: Loc
Location of the ensure
keyword
begin; ensure; end
~~~~~~
expression_l: Loc
Location of the full expression
begin; 1; rescue; 2; else; 3; ensure; 4; end
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note: begin/end belong to KwBegin
node.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Ensure
impl UnwindSafe for Ensure
Blanket Implementations
Mutably borrows from an owned value. Read more