Struct full_moon::ast::MethodCall
source · pub struct MethodCall { /* private fields */ }
Expand description
A method call, such as x:y()
Implementations§
source§impl MethodCall
impl MethodCall
sourcepub fn new(name: TokenReference, args: FunctionArgs) -> Self
pub fn new(name: TokenReference, args: FunctionArgs) -> Self
Returns a new MethodCall from the given name and args
sourcepub fn colon_token(&self) -> &TokenReference
pub fn colon_token(&self) -> &TokenReference
The :
in x:y()
sourcepub fn args(&self) -> &FunctionArgs
pub fn args(&self) -> &FunctionArgs
The arguments of a method call, the x, y, z
part of method:call(x, y, z)
sourcepub fn name(&self) -> &TokenReference
pub fn name(&self) -> &TokenReference
The method being called, the call
part of method:call()
sourcepub fn with_colon_token(self, colon_token: TokenReference) -> Self
pub fn with_colon_token(self, colon_token: TokenReference) -> Self
Returns a new MethodCall with the given :
token
sourcepub fn with_name(self, name: TokenReference) -> Self
pub fn with_name(self, name: TokenReference) -> Self
Returns a new MethodCall with the given name
sourcepub fn with_args(self, args: FunctionArgs) -> Self
pub fn with_args(self, args: FunctionArgs) -> Self
Returns a new MethodCall with the given args
Trait Implementations§
source§impl Clone for MethodCall
impl Clone for MethodCall
source§fn clone(&self) -> MethodCall
fn clone(&self) -> MethodCall
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MethodCall
impl Debug for MethodCall
source§impl<'de> Deserialize<'de> for MethodCall
impl<'de> Deserialize<'de> for MethodCall
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for MethodCall
impl Display for MethodCall
source§impl Node for MethodCall
impl Node for MethodCall
source§fn start_position(&self) -> Option<Position>
fn start_position(&self) -> Option<Position>
The start position of a node. None if can’t be determined
source§fn end_position(&self) -> Option<Position>
fn end_position(&self) -> Option<Position>
The end position of a node. None if it can’t be determined
source§fn similar(&self, other: &Self) -> bool
fn similar(&self, other: &Self) -> bool
Whether another node of the same type is the same as this one semantically, ignoring position
source§impl PartialEq for MethodCall
impl PartialEq for MethodCall
source§fn eq(&self, other: &MethodCall) -> bool
fn eq(&self, other: &MethodCall) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MethodCall
impl Serialize for MethodCall
impl StructuralPartialEq for MethodCall
Auto Trait Implementations§
impl RefUnwindSafe for MethodCall
impl Send for MethodCall
impl Sync for MethodCall
impl Unpin for MethodCall
impl UnwindSafe for MethodCall
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