[−][src]Struct full_moon::ast::FunctionName
A function name when being declared
Implementations
impl<'a> FunctionName<'a>
[src]
pub fn new(names: Punctuated<'a, Cow<'a, TokenReference<'a>>>) -> Self
[src]
Creates a new FunctionName from the given list of names
pub fn method_colon(&self) -> Option<&TokenReference<'a>>
[src]
The colon between the name and the method, the :
part of function x:y() end
pub fn method_name(&self) -> Option<&TokenReference<'a>>
[src]
A method name if one exists, the y
part of function x:y() end
pub fn names(&self) -> &Punctuated<'a, Cow<'a, TokenReference<'a>>>
[src]
Returns the Punctuated
sequence over the names used when defining the function.
This is the x.y.z
part of function x.y.z() end
pub fn with_names(
self,
names: Punctuated<'a, Cow<'a, TokenReference<'a>>>
) -> Self
[src]
self,
names: Punctuated<'a, Cow<'a, TokenReference<'a>>>
) -> Self
Returns a new FunctionName with the given names
pub fn with_method(
self,
method: Option<(Cow<'a, TokenReference<'a>>, Cow<'a, TokenReference<'a>>)>
) -> Self
[src]
self,
method: Option<(Cow<'a, TokenReference<'a>>, Cow<'a, TokenReference<'a>>)>
) -> Self
Returns a new FunctionName with the given method name The first token is the colon, and the second token is the method name itself
Trait Implementations
impl<'a> Clone for FunctionName<'a>
[src]
fn clone(&self) -> FunctionName<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for FunctionName<'a>
[src]
impl<'de: 'a, 'a> Deserialize<'de> for FunctionName<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a> Display for FunctionName<'a>
[src]
impl<'a> Node<'a> for FunctionName<'a>
[src]
fn start_position(&self) -> Option<Position>
[src]
fn end_position(&self) -> Option<Position>
[src]
fn similar(&self, other: &Self) -> bool
[src]
fn tokens<'b>(&'b self) -> Tokens<'a, 'b>ⓘ
[src]
fn range(&self) -> Option<(Position, Position)>
[src]
fn surrounding_trivia<'b>(
&'b self
) -> (Vec<Cow<'b, Token<'ast>>>, Vec<Cow<'b, Token<'ast>>>)
[src]
&'b self
) -> (Vec<Cow<'b, Token<'ast>>>, Vec<Cow<'b, Token<'ast>>>)
impl<'a> Owned for FunctionName<'a>
[src]
type Owned = FunctionName<'static>
What an owned version of the object looks like. Usually contains a 'static
lifetime.
fn owned(&self) -> Self::Owned
[src]
impl<'a> PartialEq<FunctionName<'a>> for FunctionName<'a>
[src]
fn eq(&self, other: &FunctionName<'a>) -> bool
[src]
fn ne(&self, other: &FunctionName<'a>) -> bool
[src]
impl<'a> Serialize for FunctionName<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'a> StructuralPartialEq for FunctionName<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for FunctionName<'a>
impl<'a> Send for FunctionName<'a>
impl<'a> Sync for FunctionName<'a>
impl<'a> Unpin for FunctionName<'a>
impl<'a> UnwindSafe for FunctionName<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,