Struct bracket::helper::each::Each [−][src]
pub struct Each;
Expand description
Iterate an array or object.
Accepts a single argument of the target to iterate, if the target is not an array or object this will return an error.
Each iteration sets a new scope with the local variables:
@first
: If this is the first iterationtrue
.@last
: If this is the last iterationtrue
.
Note that these variables are set even for objects where iteration order is not guaranteed which can be useful.
For objects the @key
variable contains the name of the field; for
arrays the @index
variable contains the current zero-based index.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Each
impl UnwindSafe for Each