Struct ruby_prism::DefNode
source · pub struct DefNode<'pr> { /* private fields */ }
Expand description
Represents a method definition.
def method
end
^^^^^^^^^^
Implementations§
source§impl<'pr> DefNode<'pr>
impl<'pr> DefNode<'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 name(&self) -> ConstantId<'pr>
pub fn name(&self) -> ConstantId<'pr>
Returns the name
param
sourcepub fn parameters(&self) -> Option<ParametersNode<'pr>>
pub fn parameters(&self) -> Option<ParametersNode<'pr>>
Returns the parameters
param
sourcepub fn locals(&self) -> ConstantList<'pr>
pub fn locals(&self) -> ConstantList<'pr>
Returns the locals
param
sourcepub fn def_keyword_loc(&self) -> Location<'pr>
pub fn def_keyword_loc(&self) -> Location<'pr>
Returns the def_keyword_loc
param
sourcepub fn operator_loc(&self) -> Option<Location<'pr>>
pub fn operator_loc(&self) -> Option<Location<'pr>>
Returns the operator_loc
param
sourcepub fn lparen_loc(&self) -> Option<Location<'pr>>
pub fn lparen_loc(&self) -> Option<Location<'pr>>
Returns the lparen_loc
param
sourcepub fn rparen_loc(&self) -> Option<Location<'pr>>
pub fn rparen_loc(&self) -> Option<Location<'pr>>
Returns the rparen_loc
param
sourcepub fn end_keyword_loc(&self) -> Option<Location<'pr>>
pub fn end_keyword_loc(&self) -> Option<Location<'pr>>
Returns the end_keyword_loc
param
Trait Implementations§
Auto Trait Implementations§
impl<'pr> RefUnwindSafe for DefNode<'pr>
impl<'pr> !Send for DefNode<'pr>
impl<'pr> !Sync for DefNode<'pr>
impl<'pr> Unpin for DefNode<'pr>
impl<'pr> !UnwindSafe for DefNode<'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