検索
Results of 21 - 30 of about 57 for mut (0.042 sec.)
- ミュータビリティ - Rust By Example 日本語版 7048
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
変数はデフォルトでイミュータブル(変更不可能)ですが mut 構文を使用することでミュータブルになります。 fn ma...
in() { let _immutable_binding = 1; let mut mutable_binding = 1; prin...
tln!("Before mutation: {}", mutable_binding); // Ok mutable_binding...
+= 1; println!("After mutation: {}", mutable_binding); // Error! _immutable_...
- https://man.plustar.jp/rust/example/variable_bindings/mut.html - [similar]
- Tests - Rust By Example 日本語版 6960
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ferris.txt or creates one if it doesn't exist. let mut file = OpenOptions::new() .append(true) .create(tr...
ferris.txt or creates one if it doesn't exist. let mut file = OpenOptions::new() .append(true) .create(tr...
- https://man.plustar.jp/rust/example/cargo/test.html - [similar]
- while let - Rust By Example 日本語版 6960
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ption<i32>` // `Option<i32>`の`optional`を作成 let mut optional = Some(0); // Repeatedly try this test. /...
ption<i32>` // `Option<i32>`の`optional`を作成 let mut optional = Some(0); // This reads: "while `let` de...
- https://man.plustar.jp/rust/example/flow_control/while_let.html - [similar]
- ハッシュ集合 - Rust By Example 日本語版 6960
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
う。 use std::collections::HashSet; fn main() { let mut a: HashSet<i32> = vec![1i32, 2, 3].into_iter().col...
lect(); let mut b: HashSet<i32> = vec![2i32, 3, 4].into_iter().col...
- https://man.plustar.jp/rust/example/std/hash/hashset.html - [similar]
- チャネル - Rust By Example 日本語版 6960
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
Sender<i32>, Receiver<i32>) = mpsc::channel(); let mut children = Vec::new(); for id in 0..NTHREADS { //...
cted // ここで、全てのメッセージが収集される。 let mut ids = Vec::with_capacity(NTHREADS as usize); for _...
- https://man.plustar.jp/rust/example/std_misc/channels.html - [similar]
- パイプ - Rust By Example 日本語版 6960
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
<ChildStdout>`型なのでアンラップする必要がある let mut s = String::new(); match process.stdout.unwrap().r...
ead_to_string(&mut s) { Err(why) => panic!("couldn't read wc stdout:...
- https://man.plustar.jp/rust/example/std_misc/process/pipe.html - [similar]
- イテレータ - Rust By Example 日本語版 6960
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
うでなければ`Some`でラップされた値を返す。 fn next(&mut self) -> Option<Self::Item> { let new_next = self....
// `0..3`は0, 1, 2をジェネレートする`Iterator` let mut sequence = 0..3; println!("Four consecutive `next`...
- https://man.plustar.jp/rust/example/trait/iter.html - [similar]
- トレイト - Rust By Example 日本語版 6960
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
n is_naked(&self) -> bool { self.naked } fn shear(&mut self) { if self.is_naked() { // Implementor method...
is case. // この場合、型アノテーションが必須。 let mut dolly: Sheep = Animal::new("Dolly"); // TODO ^ Try...
- https://man.plustar.jp/rust/example/trait.html - [similar]
- 文字列 - Rust By Example 日本語版 6872
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
/ 文字をベクトルにコピー。ソートして重複を除去 let mut chars: Vec<char> = pangram.chars().collect(); char...
tring` // 中身が空で、伸長可能な`String`を作成 let mut string = String::new(); for c in chars { // Insert...
- https://man.plustar.jp/rust/example/std/str.html - [similar]
- Stringとの型変換 - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
} impl fmt::Display for Circle { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Circle...
- https://man.plustar.jp/rust/example/conversion/string.html - [similar]