pub struct ForIntro {
pub key_var: Option<Decorated<Ident>>,
pub value_var: Decorated<Ident>,
pub collection_expr: Expression,
/* private fields */
}
Expand description
The for
expression introduction, containing an optional key var, value var and the
collection expression that is iterated.
Fields§
§key_var: Option<Decorated<Ident>>
Optional name of the variable that will be temporarily assigned the key of each element during iteration. If the source collection is an array, it gets assigned the zero-based array index. For an object source collection, this gets assigned the object’s key.
value_var: Decorated<Ident>
The name of the variable that will be temporarily assigned the value of each element during iteration.
collection_expr: Expression
An expression that must evaluate to a value that can be iterated.
Implementations§
Trait Implementations§
impl Eq for ForIntro
Auto Trait Implementations§
impl Freeze for ForIntro
impl RefUnwindSafe for ForIntro
impl Send for ForIntro
impl Sync for ForIntro
impl Unpin for ForIntro
impl UnwindSafe for ForIntro
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