[][src]Struct bracket::helper::each::Each

pub struct Each;

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 iteration true.
  • @last: If this is the last iteration true.

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

impl Helper for Each[src]

Auto Trait Implementations

impl RefUnwindSafe for Each

impl Send for Each

impl Sync for Each

impl Unpin for Each

impl UnwindSafe for Each

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.