Skip to main content

DefNode

Struct DefNode 

Source
pub struct DefNode<'pr> { /* private fields */ }
Expand description

Represents a method definition.

def method
end
^^^^^^^^^^

Implementationsยง

Sourceยง

impl<'pr> DefNode<'pr>

Source

pub const fn as_node(&self) -> Node<'pr>

Converts this node to a generic node.

Source

pub fn location(&self) -> Location<'pr>

Returns the location of this node.

Source

pub fn flags(&self) -> pm_node_flags_t

Returns the flags of this node.

Source

pub fn name(&self) -> ConstantId<'pr>

Returns the name param

Source

pub fn name_loc(&self) -> Location<'pr>

Returns the name_loc param

Source

pub fn receiver(&self) -> Option<Node<'pr>>

Returns the receiver param

Source

pub fn parameters(&self) -> Option<ParametersNode<'pr>>

Returns the parameters param

Source

pub fn body(&self) -> Option<Node<'pr>>

Returns the body param

Source

pub fn locals(&self) -> ConstantList<'pr>

Returns the locals param

Source

pub fn def_keyword_loc(&self) -> Location<'pr>

Returns the def_keyword_loc param

Source

pub fn operator_loc(&self) -> Option<Location<'pr>>

Returns the operator_loc param

Source

pub fn lparen_loc(&self) -> Option<Location<'pr>>

Returns the lparen_loc param

Source

pub fn rparen_loc(&self) -> Option<Location<'pr>>

Returns the rparen_loc param

Source

pub fn equal_loc(&self) -> Option<Location<'pr>>

Returns the equal_loc param

Source

pub fn end_keyword_loc(&self) -> Option<Location<'pr>>

Returns the end_keyword_loc param

Trait Implementationsยง

Sourceยง

impl Debug for DefNode<'_>

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementationsยง

ยง

impl<'pr> !Send for DefNode<'pr>

ยง

impl<'pr> !Sync for DefNode<'pr>

ยง

impl<'pr> !UnwindSafe for DefNode<'pr>

ยง

impl<'pr> Freeze for DefNode<'pr>

ยง

impl<'pr> RefUnwindSafe for DefNode<'pr>

ยง

impl<'pr> Unpin for DefNode<'pr>

ยง

impl<'pr> UnsafeUnpin for DefNode<'pr>

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = !

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.