[][src]Struct full_moon::ast::FunctionName

pub struct FunctionName<'a> { /* fields omitted */ }

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]

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]

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]

impl<'a> Debug for FunctionName<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for FunctionName<'a>[src]

impl<'a> Display for FunctionName<'a>[src]

impl<'a> Node<'a> for FunctionName<'a>[src]

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.

impl<'a> PartialEq<FunctionName<'a>> for FunctionName<'a>[src]

impl<'a> Serialize for FunctionName<'a>[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.