Struct full_moon::ast::MethodCall
source · [−]pub struct MethodCall { /* private fields */ }
Expand description
A method call, such as x:y()
Implementations
sourceimpl 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
sourceimpl Clone for MethodCall
impl Clone for MethodCall
sourcefn clone(&self) -> MethodCall
fn clone(&self) -> MethodCall
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MethodCall
impl Debug for MethodCall
sourceimpl<'de> Deserialize<'de> for MethodCall
impl<'de> Deserialize<'de> for MethodCall
sourcefn 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
sourceimpl Display for MethodCall
impl Display for MethodCall
sourceimpl Node for MethodCall
impl Node for MethodCall
sourcefn start_position(&self) -> Option<Position>
fn start_position(&self) -> Option<Position>
The start position of a node. None if can’t be determined
sourcefn end_position(&self) -> Option<Position>
fn end_position(&self) -> Option<Position>
The end position of a node. None if it can’t be determined
sourcefn 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
sourcefn tokens<'a>(&'a self) -> Tokens<'a>ⓘNotable traits for Tokens<'a>impl<'a> Iterator for Tokens<'a> type Item = &'a TokenReference;
fn tokens<'a>(&'a self) -> Tokens<'a>ⓘNotable traits for Tokens<'a>impl<'a> Iterator for Tokens<'a> type Item = &'a TokenReference;
The token references that comprise a node
sourceimpl PartialEq<MethodCall> for MethodCall
impl PartialEq<MethodCall> for MethodCall
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &MethodCall) -> bool
fn ne(&self, other: &MethodCall) -> bool
This method tests for !=
.
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more