[][src]Struct full_moon::ast::LocalAssignment

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

An assignment to a local variable, such as local x = 1

Implementations

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

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

Returns a new LocalAssignment from the given name list

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

The local token

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

The = token in between local x = y, if one exists

pub fn expr_list(&self) -> &Punctuated<'a, Expression<'a>>[src]

Returns the punctuated sequence of the expressions being assigned. This is the 1, 2 part of local x, y = 1, 2

pub fn name_list(&self) -> &Punctuated<'a, Cow<'a, TokenReference<'a>>>[src]

Returns the punctuated sequence of names being assigned to. This is the x, y part of local x, y = 1, 2

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

Returns a new LocalAssignment with the given local token

pub fn with_name_list(
    self,
    name_list: Punctuated<'a, Cow<'a, TokenReference<'a>>>
) -> Self
[src]

Returns a new LocalAssignment with the given name list

pub fn with_equal_token(
    self,
    equal_token: Option<Cow<'a, TokenReference<'a>>>
) -> Self
[src]

Returns a new LocalAssignment with the given = token

pub fn with_expr_list(self, expr_list: Punctuated<'a, Expression<'a>>) -> Self[src]

Returns a new LocalAssignment with the given expression list

Trait Implementations

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

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

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

impl<'_> Display for LocalAssignment<'_>[src]

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

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

type Owned = LocalAssignment<'static>

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

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

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

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

Auto Trait Implementations

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.