本文簡要介紹rust語言中 Struct std::iter::Chain
的用法。
用法
pub struct Chain<A, B> { /* fields omitted */ }
在鏈中將兩個迭代器鏈接在一起的迭代器。
此 struct
由 Iterator::chain
創建。有關更多信息,請參閱其文檔。
例子
use std::iter::Chain;
use std::slice::Iter;
let a1 = [1, 2, 3];
let a2 = [4, 5, 6];
let iter: Chain<Iter<_>, Iter<_>> = a1.iter().chain(a2.iter());
相關用法
- Rust Chain.get_ref用法及代碼示例
- Rust Chain.get_mut用法及代碼示例
- Rust Chain.into_inner用法及代碼示例
- Rust Chars.as_str用法及代碼示例
- Rust CharIndices.offset用法及代碼示例
- Rust Child用法及代碼示例
- Rust Child.wait用法及代碼示例
- Rust Child.wait_with_output用法及代碼示例
- Rust ChunksExact用法及代碼示例
- Rust Child.kill用法及代碼示例
- Rust Chunks用法及代碼示例
- Rust Child.id用法及代碼示例
- Rust Child.try_wait用法及代碼示例
- Rust ChunksMut用法及代碼示例
- Rust ChunksExactMut用法及代碼示例
- Rust CStr.into_c_string用法及代碼示例
- Rust Cursor.new用法及代碼示例
- Rust Condvar.notify_all用法及代碼示例
- Rust Cursor.remaining_slice用法及代碼示例
- Rust Command.args用法及代碼示例
- Rust Condvar.wait用法及代碼示例
- Rust CString.into_bytes用法及代碼示例
- Rust CStr.from_bytes_with_nul用法及代碼示例
- Rust Cow.is_owned用法及代碼示例
- Rust Cow用法及代碼示例
注:本文由純淨天空篩選整理自rust-lang.org大神的英文原創作品 Struct std::iter::Chain。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。