[][src]Struct full_moon::ast::FunctionDeclaration

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

A normal function declaration, supports simple declarations like function x() end as well as complicated declarations such as function x.y.z:a() end

Implementations

impl<'a> FunctionDeclaration<'a>[src]

pub fn new(name: FunctionName<'a>) -> Self[src]

Creates a new FunctionDeclaration from the given name

pub fn function_token(&self) -> &TokenReference<'a>[src]

The function token

pub fn body(&self) -> &FunctionBody<'a>[src]

The body of the function

pub fn name(&self) -> &FunctionName<'a>[src]

The name of the function

pub fn with_function_token(
    self,
    function_token: Cow<'a, TokenReference<'a>>
) -> Self
[src]

Returns a new FunctionDeclaration with the given function token

pub fn with_name(self, name: FunctionName<'a>) -> Self[src]

Returns a new FunctionDeclaration with the given function name

pub fn with_body(self, body: FunctionBody<'a>) -> Self[src]

Returns a new FunctionDeclaration with the given function body

Trait Implementations

impl<'a> Clone for FunctionDeclaration<'a>[src]

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

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

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

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

impl<'a> Owned for FunctionDeclaration<'a>[src]

type Owned = FunctionDeclaration<'static>

What an owned version of the object looks like. Usually contains a 'static lifetime.

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

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

impl<'a> StructuralPartialEq for FunctionDeclaration<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for FunctionDeclaration<'a>

impl<'a> Send for FunctionDeclaration<'a>

impl<'a> Sync for FunctionDeclaration<'a>

impl<'a> Unpin for FunctionDeclaration<'a>

impl<'a> UnwindSafe for FunctionDeclaration<'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.