pub trait IntoIterator {
type Item;
type IntoIter: Iterator<Item = Self::Item>;
// Required method
fn into_iter(self) -> Self::IntoIter;
}
Expand description
Conversion into an Iterator
.
By implementing IntoIterator
for a type, you define how it will be
converted to an iterator. This is common for types which describe a
collection of some kind.
One benefit of implementing IntoIterator
is that your type will work
with Rust’s for
loop syntax.
See also: FromIterator
.
§Examples
Basic usage:
let v = [1, 2, 3];
let mut iter = v.into_iter();
assert_eq!(Some(1), iter.next());
assert_eq!(Some(2), iter.next());
assert_eq!(Some(3), iter.next());
assert_eq!(None, iter.next());
Implementing IntoIterator
for your type:
// A sample collection, that's just a wrapper over Vec<T>
#[derive(Debug)]
struct MyCollection(Vec<i32>);
// Let's give it some methods so we can create one and add things
// to it.
impl MyCollection {
fn new() -> MyCollection {
MyCollection(Vec::new())
}
fn add(&mut self, elem: i32) {
self.0.push(elem);
}
}
// and we'll implement IntoIterator
impl IntoIterator for MyCollection {
type Item = i32;
type IntoIter = std::vec::IntoIter<Self::Item>;
fn into_iter(self) -> Self::IntoIter {
self.0.into_iter()
}
}
// Now we can make a new collection...
let mut c = MyCollection::new();
// ... add some stuff to it ...
c.add(0);
c.add(1);
c.add(2);
// ... and then turn it into an Iterator:
for (i, n) in c.into_iter().enumerate() {
assert_eq!(i as i32, n);
}
It is common to use IntoIterator
as a trait bound. This allows
the input collection type to change, so long as it is still an
iterator. Additional bounds can be specified by restricting on
Item
:
fn collect_as_strings<T>(collection: T) -> Vec<String>
where
T: IntoIterator,
T::Item: std::fmt::Debug,
{
collection
.into_iter()
.map(|item| format!("{item:?}"))
.collect()
}
Required Associated Types§
Required Methods§
1.0.0 · Sourcefn into_iter(self) -> Self::IntoIter
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value.
See the module-level documentation for more.
§Examples
let v = [1, 2, 3];
let mut iter = v.into_iter();
assert_eq!(Some(1), iter.next());
assert_eq!(Some(2), iter.next());
assert_eq!(Some(3), iter.next());
assert_eq!(None, iter.next());
Implementors§
Source§impl IntoIterator for &BoundedRegSpan
impl IntoIterator for &BoundedRegSpan
1.29.0 · Source§impl IntoIterator for proc_macro::TokenStream
impl IntoIterator for proc_macro::TokenStream
Source§impl IntoIterator for proc_macro2::TokenStream
impl IntoIterator for proc_macro2::TokenStream
Source§impl IntoIterator for regex::regexset::bytes::SetMatches
impl IntoIterator for regex::regexset::bytes::SetMatches
Source§impl IntoIterator for regex::regexset::string::SetMatches
impl IntoIterator for regex::regexset::string::SetMatches
Source§impl IntoIterator for CreateFlags
impl IntoIterator for CreateFlags
type Item = CreateFlags
type IntoIter = Iter<CreateFlags>
Source§impl IntoIterator for ReadFlags
impl IntoIterator for ReadFlags
Source§impl IntoIterator for WatchFlags
impl IntoIterator for WatchFlags
type Item = WatchFlags
type IntoIter = Iter<WatchFlags>
Source§impl IntoIterator for FallocateFlags
impl IntoIterator for FallocateFlags
type Item = FallocateFlags
type IntoIter = Iter<FallocateFlags>
Source§impl IntoIterator for MemfdFlags
impl IntoIterator for MemfdFlags
type Item = MemfdFlags
type IntoIter = Iter<MemfdFlags>
Source§impl IntoIterator for RenameFlags
impl IntoIterator for RenameFlags
type Item = RenameFlags
type IntoIter = Iter<RenameFlags>
Source§impl IntoIterator for ResolveFlags
impl IntoIterator for ResolveFlags
type Item = ResolveFlags
type IntoIter = Iter<ResolveFlags>
Source§impl IntoIterator for SealFlags
impl IntoIterator for SealFlags
Source§impl IntoIterator for StatVfsMountFlags
impl IntoIterator for StatVfsMountFlags
type Item = StatVfsMountFlags
type IntoIter = Iter<StatVfsMountFlags>
Source§impl IntoIterator for DupFlags
impl IntoIterator for DupFlags
Source§impl IntoIterator for ReadWriteFlags
impl IntoIterator for ReadWriteFlags
type Item = ReadWriteFlags
type IntoIter = Iter<ReadWriteFlags>
Source§impl IntoIterator for StatxAttributes
impl IntoIterator for StatxAttributes
type Item = StatxAttributes
type IntoIter = Iter<StatxAttributes>
Source§impl IntoIterator for StatxFlags
impl IntoIterator for StatxFlags
type Item = StatxFlags
type IntoIter = Iter<StatxFlags>
Source§impl IntoIterator for XattrFlags
impl IntoIterator for XattrFlags
type Item = XattrFlags
type IntoIter = Iter<XattrFlags>
Source§impl IntoIterator for SerializedSignature
impl IntoIterator for SerializedSignature
Source§impl IntoIterator for Array
impl IntoIterator for Array
Source§impl IntoIterator for ArrayOfTables
impl IntoIterator for ArrayOfTables
Source§impl IntoIterator for InlineTable
impl IntoIterator for InlineTable
Source§impl IntoIterator for Table
impl IntoIterator for Table
Source§impl IntoIterator for WalkDir
impl IntoIterator for WalkDir
Source§impl IntoIterator for BoundedRegSpan
impl IntoIterator for BoundedRegSpan
Source§impl<'a> IntoIterator for &'a Utf8Sequence
impl<'a> IntoIterator for &'a Utf8Sequence
Source§impl<'a> IntoIterator for &'a Fields
impl<'a> IntoIterator for &'a Fields
1.10.0 · Source§impl<'a> IntoIterator for &'a UnixListener
impl<'a> IntoIterator for &'a UnixListener
1.6.0 · Source§impl<'a> IntoIterator for &'a Path
impl<'a> IntoIterator for &'a Path
1.6.0 · Source§impl<'a> IntoIterator for &'a PathBuf
impl<'a> IntoIterator for &'a PathBuf
Source§impl<'a> IntoIterator for &'a regex::regexset::bytes::SetMatches
impl<'a> IntoIterator for &'a regex::regexset::bytes::SetMatches
Source§impl<'a> IntoIterator for &'a regex::regexset::string::SetMatches
impl<'a> IntoIterator for &'a regex::regexset::string::SetMatches
Source§impl<'a> IntoIterator for &'a SerializedSignature
impl<'a> IntoIterator for &'a SerializedSignature
Source§impl<'a> IntoIterator for &'a InstrSequence
impl<'a> IntoIterator for &'a InstrSequence
Source§impl<'a> IntoIterator for &'a mut Fields
impl<'a> IntoIterator for &'a mut Fields
Source§impl<'a> IntoIterator for &'a mut InstrSequence
impl<'a> IntoIterator for &'a mut InstrSequence
type Item = &'a mut Instruction
type IntoIter = InstrIterMut<'a>
Source§impl<'a> IntoIterator for wasmparser_nostd::readers::core::code::LocalsReader<'a>
impl<'a> IntoIterator for wasmparser_nostd::readers::core::code::LocalsReader<'a>
Source§impl<'a> IntoIterator for wasmparser_nostd::readers::core::operators::OperatorsReader<'a>
impl<'a> IntoIterator for wasmparser_nostd::readers::core::operators::OperatorsReader<'a>
type Item = Result<Operator<'a>, BinaryReaderError>
type IntoIter = OperatorsIterator<'a>
Source§impl<'a> IntoIterator for wasmparser::readers::core::code::LocalsReader<'a>
impl<'a> IntoIterator for wasmparser::readers::core::code::LocalsReader<'a>
Source§impl<'a> IntoIterator for wasmparser::readers::core::operators::OperatorsReader<'a>
impl<'a> IntoIterator for wasmparser::readers::core::operators::OperatorsReader<'a>
type Item = Result<Operator<'a>, BinaryReaderError>
type IntoIter = OperatorsIterator<'a>
Source§impl<'a, A> IntoIterator for &'a SmallVec<A>where
A: Array,
impl<'a, A> IntoIterator for &'a SmallVec<A>where
A: Array,
Source§impl<'a, A> IntoIterator for &'a mut SmallVec<A>where
A: Array,
impl<'a, A> IntoIterator for &'a mut SmallVec<A>where
A: Array,
Source§impl<'a, I> IntoIterator for &'a IntoChunks<I>
impl<'a, I> IntoIterator for &'a IntoChunks<I>
Source§impl<'a, I> IntoIterator for &'a RcIter<I>where
I: Iterator,
Return an iterator from &RcIter<I>
(by simply cloning it).
impl<'a, I> IntoIterator for &'a RcIter<I>where
I: Iterator,
Return an iterator from &RcIter<I>
(by simply cloning it).
Source§impl<'a, Idx, T> IntoIterator for &'a DedupArena<Idx, T>where
Idx: ArenaIndex,
impl<'a, Idx, T> IntoIterator for &'a DedupArena<Idx, T>where
Idx: ArenaIndex,
Source§impl<'a, Idx, T> IntoIterator for &'a Arena<Idx, T>where
Idx: ArenaIndex,
impl<'a, Idx, T> IntoIterator for &'a Arena<Idx, T>where
Idx: ArenaIndex,
Source§impl<'a, Idx, T> IntoIterator for &'a mut DedupArena<Idx, T>where
Idx: ArenaIndex,
impl<'a, Idx, T> IntoIterator for &'a mut DedupArena<Idx, T>where
Idx: ArenaIndex,
Source§impl<'a, Idx, T> IntoIterator for &'a mut Arena<Idx, T>where
Idx: ArenaIndex,
impl<'a, Idx, T> IntoIterator for &'a mut Arena<Idx, T>where
Idx: ArenaIndex,
Source§impl<'a, K, I, F> IntoIterator for &'a GroupBy<K, I, F>
impl<'a, K, I, F> IntoIterator for &'a GroupBy<K, I, F>
Source§impl<'a, K, V> IntoIterator for &'a indexmap_nostd::map::IndexMap<K, V>
impl<'a, K, V> IntoIterator for &'a indexmap_nostd::map::IndexMap<K, V>
Source§impl<'a, K, V> IntoIterator for &'a wasmi_collections::map::Map<K, V>
impl<'a, K, V> IntoIterator for &'a wasmi_collections::map::Map<K, V>
Source§impl<'a, K, V> IntoIterator for &'a scrypto_test::prelude::indexmap::map::Slice<K, V>
impl<'a, K, V> IntoIterator for &'a scrypto_test::prelude::indexmap::map::Slice<K, V>
Source§impl<'a, K, V> IntoIterator for &'a mut indexmap_nostd::map::IndexMap<K, V>
impl<'a, K, V> IntoIterator for &'a mut indexmap_nostd::map::IndexMap<K, V>
Source§impl<'a, K, V> IntoIterator for &'a mut wasmi_collections::map::Map<K, V>where
K: 'a,
V: 'a,
impl<'a, K, V> IntoIterator for &'a mut wasmi_collections::map::Map<K, V>where
K: 'a,
V: 'a,
Source§impl<'a, K, V> IntoIterator for &'a mut scrypto_test::prelude::indexmap::map::Slice<K, V>
impl<'a, K, V> IntoIterator for &'a mut scrypto_test::prelude::indexmap::map::Slice<K, V>
1.0.0 · Source§impl<'a, K, V, A> IntoIterator for &'a BTreeMap<K, V, A>
impl<'a, K, V, A> IntoIterator for &'a BTreeMap<K, V, A>
1.0.0 · Source§impl<'a, K, V, A> IntoIterator for &'a mut BTreeMap<K, V, A>
impl<'a, K, V, A> IntoIterator for &'a mut BTreeMap<K, V, A>
1.0.0 · Source§impl<'a, K, V, S> IntoIterator for &'a scrypto_test::prelude::hash_map::ext_HashMap<K, V, S>
impl<'a, K, V, S> IntoIterator for &'a scrypto_test::prelude::hash_map::ext_HashMap<K, V, S>
Source§impl<'a, K, V, S> IntoIterator for &'a indexmap::map::IndexMap<K, V, S>
impl<'a, K, V, S> IntoIterator for &'a indexmap::map::IndexMap<K, V, S>
Source§impl<'a, K, V, S> IntoIterator for &'a Cache<K, V, S>
impl<'a, K, V, S> IntoIterator for &'a Cache<K, V, S>
Source§impl<'a, K, V, S> IntoIterator for &'a SegmentedCache<K, V, S>
impl<'a, K, V, S> IntoIterator for &'a SegmentedCache<K, V, S>
Source§impl<'a, K, V, S> IntoIterator for &'a scrypto_test::prelude::indexmap::IndexMap<K, V, S>
impl<'a, K, V, S> IntoIterator for &'a scrypto_test::prelude::indexmap::IndexMap<K, V, S>
1.0.0 · Source§impl<'a, K, V, S> IntoIterator for &'a mut scrypto_test::prelude::hash_map::ext_HashMap<K, V, S>
impl<'a, K, V, S> IntoIterator for &'a mut scrypto_test::prelude::hash_map::ext_HashMap<K, V, S>
Source§impl<'a, K, V, S> IntoIterator for &'a mut indexmap::map::IndexMap<K, V, S>
impl<'a, K, V, S> IntoIterator for &'a mut indexmap::map::IndexMap<K, V, S>
Source§impl<'a, K, V, S> IntoIterator for &'a mut scrypto_test::prelude::indexmap::IndexMap<K, V, S>
impl<'a, K, V, S> IntoIterator for &'a mut scrypto_test::prelude::indexmap::IndexMap<K, V, S>
Source§impl<'a, K, V, S, A> IntoIterator for &'a hashbrown::map::HashMap<K, V, S, A>where
A: Allocator + Clone,
impl<'a, K, V, S, A> IntoIterator for &'a hashbrown::map::HashMap<K, V, S, A>where
A: Allocator + Clone,
Source§impl<'a, K, V, S, A> IntoIterator for &'a hashbrown::map::HashMap<K, V, S, A>where
A: Allocator,
impl<'a, K, V, S, A> IntoIterator for &'a hashbrown::map::HashMap<K, V, S, A>where
A: Allocator,
Source§impl<'a, K, V, S, A> IntoIterator for &'a mut hashbrown::map::HashMap<K, V, S, A>where
A: Allocator + Clone,
impl<'a, K, V, S, A> IntoIterator for &'a mut hashbrown::map::HashMap<K, V, S, A>where
A: Allocator + Clone,
Source§impl<'a, K, V, S, A> IntoIterator for &'a mut hashbrown::map::HashMap<K, V, S, A>where
A: Allocator,
impl<'a, K, V, S, A> IntoIterator for &'a mut hashbrown::map::HashMap<K, V, S, A>where
A: Allocator,
1.4.0 · Source§impl<'a, T> IntoIterator for &'a Option<T>
impl<'a, T> IntoIterator for &'a Option<T>
1.0.0 · Source§impl<'a, T> IntoIterator for &'a [T]
impl<'a, T> IntoIterator for &'a [T]
Source§impl<'a, T> IntoIterator for &'a crossbeam_channel::channel::Receiver<T>
impl<'a, T> IntoIterator for &'a crossbeam_channel::channel::Receiver<T>
Source§impl<'a, T> IntoIterator for &'a CxxVector<T>where
T: VectorElement,
impl<'a, T> IntoIterator for &'a CxxVector<T>where
T: VectorElement,
Source§impl<'a, T> IntoIterator for &'a indexmap_nostd::set::IndexSet<T>
impl<'a, T> IntoIterator for &'a indexmap_nostd::set::IndexSet<T>
Source§impl<'a, T> IntoIterator for &'a MultiStash<T>
impl<'a, T> IntoIterator for &'a MultiStash<T>
Source§impl<'a, T> IntoIterator for &'a Set<T>
impl<'a, T> IntoIterator for &'a Set<T>
Source§impl<'a, T> IntoIterator for &'a scrypto_test::prelude::indexmap::set::Slice<T>
impl<'a, T> IntoIterator for &'a scrypto_test::prelude::indexmap::set::Slice<T>
Source§impl<'a, T> IntoIterator for &'a scrypto_test::prelude::rust::sync::mpmc::Receiver<T>
impl<'a, T> IntoIterator for &'a scrypto_test::prelude::rust::sync::mpmc::Receiver<T>
1.1.0 · Source§impl<'a, T> IntoIterator for &'a scrypto_test::prelude::rust::sync::mpsc::Receiver<T>
impl<'a, T> IntoIterator for &'a scrypto_test::prelude::rust::sync::mpsc::Receiver<T>
1.4.0 · Source§impl<'a, T> IntoIterator for &'a mut Option<T>
impl<'a, T> IntoIterator for &'a mut Option<T>
1.0.0 · Source§impl<'a, T> IntoIterator for &'a mut [T]
impl<'a, T> IntoIterator for &'a mut [T]
Source§impl<'a, T> IntoIterator for &'a mut MultiStash<T>
impl<'a, T> IntoIterator for &'a mut MultiStash<T>
Source§impl<'a, T> IntoIterator for Pin<&'a mut CxxVector<T>>where
T: VectorElement,
impl<'a, T> IntoIterator for Pin<&'a mut CxxVector<T>>where
T: VectorElement,
Source§impl<'a, T> IntoIterator for wasmparser_nostd::readers::SectionLimited<'a, T>where
T: FromReader<'a>,
impl<'a, T> IntoIterator for wasmparser_nostd::readers::SectionLimited<'a, T>where
T: FromReader<'a>,
type Item = Result<T, BinaryReaderError>
type IntoIter = SectionLimitedIntoIter<'a, T>
Source§impl<'a, T> IntoIterator for wasmparser::readers::SectionLimited<'a, T>where
T: FromReader<'a>,
impl<'a, T> IntoIterator for wasmparser::readers::SectionLimited<'a, T>where
T: FromReader<'a>,
type Item = Result<T, BinaryReaderError>
type IntoIter = SectionLimitedIntoIter<'a, T>
1.0.0 · Source§impl<'a, T, A> IntoIterator for &'a BinaryHeap<T, A>where
A: Allocator,
impl<'a, T, A> IntoIterator for &'a BinaryHeap<T, A>where
A: Allocator,
Source§impl<'a, T, A> IntoIterator for &'a HashTable<T, A>where
A: Allocator,
impl<'a, T, A> IntoIterator for &'a HashTable<T, A>where
A: Allocator,
1.0.0 · Source§impl<'a, T, A> IntoIterator for &'a BTreeSet<T, A>
impl<'a, T, A> IntoIterator for &'a BTreeSet<T, A>
1.0.0 · Source§impl<'a, T, A> IntoIterator for &'a LinkedList<T, A>where
A: Allocator,
impl<'a, T, A> IntoIterator for &'a LinkedList<T, A>where
A: Allocator,
1.0.0 · Source§impl<'a, T, A> IntoIterator for &'a Vec<T, A>where
A: Allocator,
impl<'a, T, A> IntoIterator for &'a Vec<T, A>where
A: Allocator,
1.0.0 · Source§impl<'a, T, A> IntoIterator for &'a VecDeque<T, A>where
A: Allocator,
impl<'a, T, A> IntoIterator for &'a VecDeque<T, A>where
A: Allocator,
Source§impl<'a, T, A> IntoIterator for &'a mut HashTable<T, A>where
A: Allocator,
impl<'a, T, A> IntoIterator for &'a mut HashTable<T, A>where
A: Allocator,
1.0.0 · Source§impl<'a, T, A> IntoIterator for &'a mut LinkedList<T, A>where
A: Allocator,
impl<'a, T, A> IntoIterator for &'a mut LinkedList<T, A>where
A: Allocator,
1.0.0 · Source§impl<'a, T, A> IntoIterator for &'a mut Vec<T, A>where
A: Allocator,
impl<'a, T, A> IntoIterator for &'a mut Vec<T, A>where
A: Allocator,
1.0.0 · Source§impl<'a, T, A> IntoIterator for &'a mut VecDeque<T, A>where
A: Allocator,
impl<'a, T, A> IntoIterator for &'a mut VecDeque<T, A>where
A: Allocator,
1.4.0 · Source§impl<'a, T, E> IntoIterator for &'a Result<T, E>
impl<'a, T, E> IntoIterator for &'a Result<T, E>
1.4.0 · Source§impl<'a, T, E> IntoIterator for &'a mut Result<T, E>
impl<'a, T, E> IntoIterator for &'a mut Result<T, E>
Source§impl<'a, T, N> IntoIterator for &'a GenericArray<T, N>where
T: 'a,
N: ArrayLength<T>,
impl<'a, T, N> IntoIterator for &'a GenericArray<T, N>where
T: 'a,
N: ArrayLength<T>,
Source§impl<'a, T, N> IntoIterator for &'a mut GenericArray<T, N>where
T: 'a,
N: ArrayLength<T>,
impl<'a, T, N> IntoIterator for &'a mut GenericArray<T, N>where
T: 'a,
N: ArrayLength<T>,
Source§impl<'a, T, P> IntoIterator for &'a Punctuated<T, P>
impl<'a, T, P> IntoIterator for &'a Punctuated<T, P>
Source§impl<'a, T, P> IntoIterator for &'a mut Punctuated<T, P>
impl<'a, T, P> IntoIterator for &'a mut Punctuated<T, P>
1.0.0 · Source§impl<'a, T, S> IntoIterator for &'a scrypto_test::prelude::hash_set::ext_HashSet<T, S>
impl<'a, T, S> IntoIterator for &'a scrypto_test::prelude::hash_set::ext_HashSet<T, S>
Source§impl<'a, T, S> IntoIterator for &'a indexmap::set::IndexSet<T, S>
impl<'a, T, S> IntoIterator for &'a indexmap::set::IndexSet<T, S>
Source§impl<'a, T, S> IntoIterator for &'a scrypto_test::prelude::indexmap::IndexSet<T, S>
impl<'a, T, S> IntoIterator for &'a scrypto_test::prelude::indexmap::IndexSet<T, S>
Source§impl<'a, T, S, A> IntoIterator for &'a hashbrown::set::HashSet<T, S, A>where
A: Allocator + Clone,
impl<'a, T, S, A> IntoIterator for &'a hashbrown::set::HashSet<T, S, A>where
A: Allocator + Clone,
Source§impl<'a, T, S, A> IntoIterator for &'a hashbrown::set::HashSet<T, S, A>where
A: Allocator,
impl<'a, T, S, A> IntoIterator for &'a hashbrown::set::HashSet<T, S, A>where
A: Allocator,
Source§impl<'a, T, const CAP: usize> IntoIterator for &'a ArrayVec<T, CAP>where
T: 'a,
Iterate the ArrayVec
with references to each element.
impl<'a, T, const CAP: usize> IntoIterator for &'a ArrayVec<T, CAP>where
T: 'a,
Iterate the ArrayVec
with references to each element.
use arrayvec::ArrayVec;
let array = ArrayVec::from([1, 2, 3]);
for elt in &array {
// ...
}
Source§impl<'a, T, const CAP: usize> IntoIterator for &'a mut ArrayVec<T, CAP>where
T: 'a,
Iterate the ArrayVec
with mutable references to each element.
impl<'a, T, const CAP: usize> IntoIterator for &'a mut ArrayVec<T, CAP>where
T: 'a,
Iterate the ArrayVec
with mutable references to each element.
use arrayvec::ArrayVec;
let mut array = ArrayVec::from([1, 2, 3]);
for elt in &mut array {
// ...
}
1.0.0 · Source§impl<'a, T, const N: usize> IntoIterator for &'a [T; N]
impl<'a, T, const N: usize> IntoIterator for &'a [T; N]
1.0.0 · Source§impl<'a, T, const N: usize> IntoIterator for &'a mut [T; N]
impl<'a, T, const N: usize> IntoIterator for &'a mut [T; N]
Source§impl<'s> IntoIterator for &'s Array
impl<'s> IntoIterator for &'s Array
Source§impl<'s> IntoIterator for &'s ArrayOfTables
impl<'s> IntoIterator for &'s ArrayOfTables
Source§impl<'s> IntoIterator for &'s InlineTable
impl<'s> IntoIterator for &'s InlineTable
Source§impl<'s> IntoIterator for &'s Table
impl<'s> IntoIterator for &'s Table
Source§impl<A> IntoIterator for Range<A>where
A: Step,
impl<A> IntoIterator for Range<A>where
A: Step,
Source§impl<A> IntoIterator for RangeFrom<A>where
A: Step,
impl<A> IntoIterator for RangeFrom<A>where
A: Step,
Source§impl<A> IntoIterator for RangeInclusive<A>where
A: Step,
impl<A> IntoIterator for RangeInclusive<A>where
A: Step,
Source§impl<A> IntoIterator for SmallVec<A>where
A: Array,
impl<A> IntoIterator for SmallVec<A>where
A: Array,
1.0.0 · Source§impl<I> IntoIterator for Iwhere
I: Iterator,
impl<I> IntoIterator for Iwhere
I: Iterator,
Source§impl<K, V> IntoIterator for indexmap_nostd::map::IndexMap<K, V>
impl<K, V> IntoIterator for indexmap_nostd::map::IndexMap<K, V>
Source§impl<K, V> IntoIterator for wasmi_collections::map::Map<K, V>
impl<K, V> IntoIterator for wasmi_collections::map::Map<K, V>
Source§impl<K, V> IntoIterator for Box<Slice<K, V>>
impl<K, V> IntoIterator for Box<Slice<K, V>>
1.0.0 · Source§impl<K, V, A> IntoIterator for BTreeMap<K, V, A>
impl<K, V, A> IntoIterator for BTreeMap<K, V, A>
1.0.0 · Source§impl<K, V, S> IntoIterator for scrypto_test::prelude::hash_map::ext_HashMap<K, V, S>
impl<K, V, S> IntoIterator for scrypto_test::prelude::hash_map::ext_HashMap<K, V, S>
Source§impl<K, V, S> IntoIterator for indexmap::map::IndexMap<K, V, S>
impl<K, V, S> IntoIterator for indexmap::map::IndexMap<K, V, S>
Source§impl<K, V, S> IntoIterator for scrypto_test::prelude::indexmap::IndexMap<K, V, S>
impl<K, V, S> IntoIterator for scrypto_test::prelude::indexmap::IndexMap<K, V, S>
Source§impl<K, V, S, A> IntoIterator for hashbrown::map::HashMap<K, V, S, A>where
A: Allocator + Clone,
impl<K, V, S, A> IntoIterator for hashbrown::map::HashMap<K, V, S, A>where
A: Allocator + Clone,
Source§impl<K, V, S, A> IntoIterator for hashbrown::map::HashMap<K, V, S, A>where
A: Allocator,
impl<K, V, S, A> IntoIterator for hashbrown::map::HashMap<K, V, S, A>where
A: Allocator,
1.0.0 · Source§impl<T> IntoIterator for Option<T>
impl<T> IntoIterator for Option<T>
Source§impl<T> IntoIterator for crossbeam_channel::channel::Receiver<T>
impl<T> IntoIterator for crossbeam_channel::channel::Receiver<T>
Source§impl<T> IntoIterator for indexmap_nostd::set::IndexSet<T>
impl<T> IntoIterator for indexmap_nostd::set::IndexSet<T>
Source§impl<T> IntoIterator for MultiStash<T>
impl<T> IntoIterator for MultiStash<T>
Source§impl<T> IntoIterator for scrypto_test::prelude::rust::sync::mpmc::Receiver<T>
impl<T> IntoIterator for scrypto_test::prelude::rust::sync::mpmc::Receiver<T>
1.1.0 · Source§impl<T> IntoIterator for scrypto_test::prelude::rust::sync::mpsc::Receiver<T>
impl<T> IntoIterator for scrypto_test::prelude::rust::sync::mpsc::Receiver<T>
1.0.0 · Source§impl<T, A> IntoIterator for BinaryHeap<T, A>where
A: Allocator,
impl<T, A> IntoIterator for BinaryHeap<T, A>where
A: Allocator,
Source§impl<T, A> IntoIterator for RawTable<T, A>where
A: Allocator + Clone,
impl<T, A> IntoIterator for RawTable<T, A>where
A: Allocator + Clone,
Source§impl<T, A> IntoIterator for HashTable<T, A>where
A: Allocator,
impl<T, A> IntoIterator for HashTable<T, A>where
A: Allocator,
1.0.0 · Source§impl<T, A> IntoIterator for BTreeSet<T, A>
impl<T, A> IntoIterator for BTreeSet<T, A>
1.0.0 · Source§impl<T, A> IntoIterator for LinkedList<T, A>where
A: Allocator,
impl<T, A> IntoIterator for LinkedList<T, A>where
A: Allocator,
1.0.0 · Source§impl<T, A> IntoIterator for Vec<T, A>where
A: Allocator,
impl<T, A> IntoIterator for Vec<T, A>where
A: Allocator,
1.0.0 · Source§impl<T, A> IntoIterator for VecDeque<T, A>where
A: Allocator,
impl<T, A> IntoIterator for VecDeque<T, A>where
A: Allocator,
1.0.0 · Source§impl<T, E> IntoIterator for Result<T, E>
impl<T, E> IntoIterator for Result<T, E>
Source§impl<T, N> IntoIterator for GenericArray<T, N>where
N: ArrayLength<T>,
impl<T, N> IntoIterator for GenericArray<T, N>where
N: ArrayLength<T>,
Source§impl<T, P> IntoIterator for Punctuated<T, P>
impl<T, P> IntoIterator for Punctuated<T, P>
1.0.0 · Source§impl<T, S> IntoIterator for scrypto_test::prelude::hash_set::ext_HashSet<T, S>
impl<T, S> IntoIterator for scrypto_test::prelude::hash_set::ext_HashSet<T, S>
Source§impl<T, S> IntoIterator for indexmap::set::IndexSet<T, S>
impl<T, S> IntoIterator for indexmap::set::IndexSet<T, S>
Source§impl<T, S> IntoIterator for scrypto_test::prelude::indexmap::IndexSet<T, S>
impl<T, S> IntoIterator for scrypto_test::prelude::indexmap::IndexSet<T, S>
Source§impl<T, S, A> IntoIterator for hashbrown::set::HashSet<T, S, A>where
A: Allocator + Clone,
impl<T, S, A> IntoIterator for hashbrown::set::HashSet<T, S, A>where
A: Allocator + Clone,
Source§impl<T, S, A> IntoIterator for hashbrown::set::HashSet<T, S, A>where
A: Allocator,
impl<T, S, A> IntoIterator for hashbrown::set::HashSet<T, S, A>where
A: Allocator,
Source§impl<T, const CAP: usize> IntoIterator for ArrayVec<T, CAP>
Iterate the ArrayVec
with each element by value.
impl<T, const CAP: usize> IntoIterator for ArrayVec<T, CAP>
Iterate the ArrayVec
with each element by value.
The vector is consumed by this operation.
use arrayvec::ArrayVec;
for elt in ArrayVec::from([1, 2, 3]) {
// ...
}