Struct ruby_prism::BlockNode
source · pub struct BlockNode<'pr> { /* private fields */ }
Expand description
Represents a block of ruby code.
[1, 2, 3].each { |i| puts x }
^^^^^^^^^^^^^^
Implementations§
source§impl<'pr> BlockNode<'pr>
impl<'pr> BlockNode<'pr>
sourcepub fn flags(&self) -> pm_node_flags_t
pub fn flags(&self) -> pm_node_flags_t
Returns the flags of this node.
sourcepub fn locals(&self) -> ConstantList<'pr>
pub fn locals(&self) -> ConstantList<'pr>
Returns the locals
param
sourcepub fn parameters(&self) -> Option<Node<'pr>>
pub fn parameters(&self) -> Option<Node<'pr>>
Returns the parameters
param
sourcepub fn opening_loc(&self) -> Location<'pr>
pub fn opening_loc(&self) -> Location<'pr>
Returns the opening_loc
param
sourcepub fn closing_loc(&self) -> Location<'pr>
pub fn closing_loc(&self) -> Location<'pr>
Returns the closing_loc
param
Trait Implementations§
Auto Trait Implementations§
impl<'pr> RefUnwindSafe for BlockNode<'pr>
impl<'pr> !Send for BlockNode<'pr>
impl<'pr> !Sync for BlockNode<'pr>
impl<'pr> Unpin for BlockNode<'pr>
impl<'pr> !UnwindSafe for BlockNode<'pr>
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