Struct

std::collections::list::ListIter!

source

Re-exported from alloc::collections::list::ListIter!.

forall T, 'k, C, R.
exposed struct ListIter! {
    tag: Exclusive!['k],
    held: R,
    rest: List[T, 'k],
}

A list's items, read under the capability a context lends (Access). iter opens the context and the iterator holds what it opened while it runs; finish closes it and hands the context back: var it = xs.iter(cx); for x in &it { .. } let cx = it.finish();.

Methods

method finishsource

fn finish(self) -> C { ... }

Ends the iteration, handing back the context.

Instances

instance Iterator[ListIter![T, 'k, C, R] -> T]source

forall T, 'k, C, R where Copy[T].
instance Iterator[ListIter![T, 'k, C, R] -> T] { ... }

In std::collections::list.

The list's elements in order, read under the capability the iterator holds.