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

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, 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 expressions(&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 names(&self) -> &Punctuated<'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 type_specifiers(
    &self
) -> impl Iterator<Item = Option<&TypeSpecifier<'a>>>
[src]

The type specifiers of the variables, in the order that they were assigned. local foo: number, bar, baz: boolean returns an iterator containing: Some(TypeSpecifier(number)), None, Some(TypeSpecifier(boolean)) Only available when the “roblox” feature flag is enabled.

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

Returns a new LocalAssignment with the given local token

pub fn with_type_specifiers(
    self,
    type_specifiers: Vec<Option<TypeSpecifier<'a>>>
) -> Self
[src]

Returns a new LocalAssignment with the given type specifiers

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

Returns a new LocalAssignment with the given name list

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

Returns a new LocalAssignment with the given = token

pub fn with_expressions(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

impl<'a> RefUnwindSafe for LocalAssignment<'a>

impl<'a> Send for LocalAssignment<'a>

impl<'a> Sync for LocalAssignment<'a>

impl<'a> Unpin for LocalAssignment<'a>

impl<'a> UnwindSafe for LocalAssignment<'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> Conv for T

impl<T> Conv for T

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

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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> TryConv for T

impl<T> TryConv for T

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.