MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / into_iter

Method into_iter

publication/code/chapter04/deque.rs:76–78  ·  view source on GitHub ↗

以下是为双端队列实现的迭代功能 into_iter: 双端队列改变,成为迭代器 iter: 双端队列不变,只得到不可变迭代器 iter_mut: 双端队列不变,得到可变迭代器

(self)

Source from the content-addressed store, hash-verified

74 // iter: 双端队列不变,只得到不可变迭代器
75 // iter_mut: 双端队列不变,得到可变迭代器
76 fn into_iter(self) -> IntoIter<T> {
77 IntoIter(self)
78 }
79
80 fn iter(&self) -> Iter<T> {
81 let mut iterator = Iter { stack: Vec::new() };

Callers

nothing calls this directly

Calls 1

IntoIterClass · 0.70

Tested by

no test coverage detected