Mojo trait
IteratorTrait
The IteratorTrait
trait describes a type that can be used as an iterator, e.g. in a for
loop.
Implemented traits
AnyType
,
Movable
,
UnknownDestructibility
Aliases
Element
alias Element
Methods
__moveinit__
__moveinit__(out self: _Self, owned existing: _Self, /)
Create a new instance of the value by moving the value of another.
Args:
- existing (
_Self
): The value to move.
__has_next__
__has_next__(self: _Self) -> Bool
__next__
__next__(mut self: _Self) -> get_vtable_entry(:trait<_stdlib::_builtin::_value::_IteratorTrait> _Self, "Element")
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!