検索
Results of 21 - 30 of about 33 for Vec (0.046 sec.)
- for と range - Rust By Example 日本語版 7091
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
レクションを再利用できます。 fn main() { let names = vec!["Bob", "Frank", "Ferris"]; for name in names.iter...
再利用することはできません。 fn main() { let names = vec!["Bob", "Frank", "Ferris"]; for name in names.into...
をその場で変更できます。 fn main() { let mut names = vec!["Bob", "Frank", "Ferris"]; for name in names.iter...
- https://man.plustar.jp/rust/example/flow_control/for.html - [similar]
- ジェネリック境界 - Rust By Example 日本語版 7091
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
来ると思います。 struct S<T: Display>(T); // Error! `Vec<T>` does not implement `Display`. This // speciali...
zation will fail. // エラー! `Vec<T>`は`Display`を実装していないため、この特殊化 //...
は失敗します。 let s = S(vec![1]); 境界のもう一つの効果は、ジェネリック型のイン...
- https://man.plustar.jp/rust/example/generics/bounds.html - [similar]
- 文字列 - Rust By Example 日本語版 7026
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
効なUTF-8の配列であることを保証されたバイトのベクタ( Vec<u8> )として保持されます。ヒープ上に保持され、伸長可...
String に変換することができます。 &[T] がいつでも Vec<T> に変換できるのと同様です。 fn main() { // (all...
) { println!("> {}", word); } // Copy chars into a vector, sort and remove duplicates // 文字をベクトルに...
コピー。ソートして重複を除去 let mut chars: Vec<char> = pangram.chars().collect(); chars.sort(); c...
- https://man.plustar.jp/rust/example/std/str.html - [similar]
- チャネル - Rust By Example 日本語版 6834
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ceiver<i32>) = mpsc::channel(); let mut children = Vec::new(); for id in 0..NTHREADS { // The sender endp...
ここで、全てのメッセージが収集される。 let mut ids = Vec::with_capacity(NTHREADS as usize); for _ in 0..NTH...
- https://man.plustar.jp/rust/example/std_misc/channels.html - [similar]
- Testcase: map-reduce - Rust By Example 日本語版 6834
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
32 16278424637452589860345374828574668"; // Make a vector to hold the child-threads which we will spawn....
let mut children = vec![]; /*********************************************...
lect each thread's intermediate results into a new Vec // collect each child thread's return-value // com...
tant at the beginning of the program. 参照 Threads vectors and iterators closures , move semantics and mo...
- https://man.plustar.jp/rust/example/std_misc/threads/testcase_mapreduce.html - [similar]
- ファイルシステムとのやり取り - Rust By Example 日本語版 6770
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
d the contents of a directory, returns `io::Result<Vec<Path>>` // ディレクトリの内容を読み込む。返り値は`...
io::Result<Vec<Path>>` match fs::read_dir("a") { Err(why) => prin...
- https://man.plustar.jp/rust/example/std_misc/fs.html - [similar]
- 引数のパース - Rust By Example 日本語版 6593
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
e given integer by one."); } fn main() { let args: Vec<String> = env::args().collect(); match args.len()...
- https://man.plustar.jp/rust/example/std_misc/arg/matching.html - [similar]
- 引数処理 - Rust By Example 日本語版 6593
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ータを返します。 use std::env; fn main() { let args: Vec<String> = env::args().collect(); // The first argu...
- https://man.plustar.jp/rust/example/std_misc/arg.html - [similar]
- Path - Rust By Example 日本語版 6593
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
の実態はUTF-8の文字列 ではなく 、バイト型のベクタ( Vec<u8> )であることに注意しましょう。したがって、 Path...
- https://man.plustar.jp/rust/example/std_misc/path.html - [similar]
- スレッド - Rust By Example 日本語版 6593
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
`main`スレッドで実行される。 fn main() { // Make a vector to hold the children which are spawned. // spaw...
クロージャを保持するためのベクタ let mut children = vec![]; for i in 0..NTHREADS { // Spin up another thre...
- https://man.plustar.jp/rust/example/std_misc/threads.html - [similar]