Struct ruby_prism::LambdaNode
source · pub struct LambdaNode<'pr> { /* private fields */ }
Expand description
Represents using a lambda literal (not the lambda method call).
->(value) { value * 2 }
^^^^^^^^^^^^^^^^^^^^^^^
Implementations§
source§impl<'pr> LambdaNode<'pr>
impl<'pr> LambdaNode<'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 operator_loc(&self) -> Location<'pr>
pub fn operator_loc(&self) -> Location<'pr>
Returns the operator_loc
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
sourcepub fn parameters(&self) -> Option<Node<'pr>>
pub fn parameters(&self) -> Option<Node<'pr>>
Returns the parameters
param
Trait Implementations§
Auto Trait Implementations§
impl<'pr> RefUnwindSafe for LambdaNode<'pr>
impl<'pr> !Send for LambdaNode<'pr>
impl<'pr> !Sync for LambdaNode<'pr>
impl<'pr> Unpin for LambdaNode<'pr>
impl<'pr> !UnwindSafe for LambdaNode<'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