[][src]Struct full_moon::ast::GenericFor

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

A generic for loop, such as for index, value in pairs(list) do end

Implementations

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

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

Creates a new GenericFor from the given names and expressions

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

The for token

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

Returns the Punctuated sequence of names In for index, value in pairs(list) do, iterates over index and value

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

The in token

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

Returns the Punctuated sequence of the expressions looped over In for index, value in pairs(list) do, iterates over pairs(list)

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

The do token

pub fn block(&self) -> &Block<'a>[src]

The code inside the for loop

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

The end token

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

Returns a new GenericFor with the given for token

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

Returns a new GenericFor with the given names

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

Returns a new GenericFor with the given in token

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

Returns a new GenericFor with the given expression list

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

Returns a new GenericFor with the given do token

pub fn with_block(self, block: Block<'a>) -> Self[src]

Returns a new GenericFor with the given block

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

Returns a new GenericFor with the given end token

Trait Implementations

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

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

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

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

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

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

type Owned = GenericFor<'static>

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

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

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

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for GenericFor<'a>

impl<'a> Send for GenericFor<'a>

impl<'a> Sync for GenericFor<'a>

impl<'a> Unpin for GenericFor<'a>

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