pub enum LuaForStatement {
Numeric {
variable: String,
start: LuaExpression,
end: LuaExpression,
step: Option<LuaExpression>,
block: Vec<LuaStatement>,
},
Generic {
variables: Vec<String>,
iterators: Vec<LuaExpression>,
block: Vec<LuaStatement>,
},
}Expand description
For statement
Variants§
Numeric
A numeric for loop: for var = start, end, step do block end.
Fields
§
start: LuaExpressionThe start value.
§
end: LuaExpressionThe end value.
§
step: Option<LuaExpression>The step value.
§
block: Vec<LuaStatement>The loop block.
Generic
A generic for loop: for vars in iters do block end.
Trait Implementations§
Source§impl Clone for LuaForStatement
impl Clone for LuaForStatement
Source§fn clone(&self) -> LuaForStatement
fn clone(&self) -> LuaForStatement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LuaForStatement
impl Debug for LuaForStatement
Source§impl<'de> Deserialize<'de> for LuaForStatement
impl<'de> Deserialize<'de> for LuaForStatement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for LuaForStatement
impl Serialize for LuaForStatement
Source§impl ToSource for LuaForStatement
impl ToSource for LuaForStatement
Source§fn to_source(&self, buffer: &mut SourceBuffer)
fn to_source(&self, buffer: &mut SourceBuffer)
Writes the source code representation of this type to the provided buffer.
Source§fn to_source_string(&self) -> String
fn to_source_string(&self) -> String
Converts this type to a source code string.
Auto Trait Implementations§
impl Freeze for LuaForStatement
impl RefUnwindSafe for LuaForStatement
impl Send for LuaForStatement
impl Sync for LuaForStatement
impl Unpin for LuaForStatement
impl UnsafeUnpin for LuaForStatement
impl UnwindSafe for LuaForStatement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more