[][src]Struct full_moon::ast::LocalFunction

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

A declaration of a local function, such as local function x() end

Implementations

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

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

Returns a new LocalFunction from the given name

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

The local token

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

The function token

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

The function body, everything except local function x in local function x(a, b, c) call() end

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

The name of the function, the x part of local function x() end

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

Returns a new LocalFunction with the given local token

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

Returns a new LocalFunction with the given function token

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

Returns a new LocalFunction with the given name

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

Returns a new LocalFunction with the given function body

Trait Implementations

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

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

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

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

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

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

type Owned = LocalFunction<'static>

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

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

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

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for LocalFunction<'a>

impl<'a> Send for LocalFunction<'a>

impl<'a> Sync for LocalFunction<'a>

impl<'a> Unpin for LocalFunction<'a>

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