検索
Results of 71 - 80 of about 193 for let (0.062 sec.)
- ミュータビリティ - Rust By Example 日本語版 5475
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
を使用することでミュータブルになります。 fn main() { let _immutable_binding = 1; let mut mutable_binding =...
Result , エラー , binding , By , Example , Rust , let , mutable...
- https://man.plustar.jp/rust/example/variable_bindings/mut.html - [similar]
- ガード - Rust By Example 日本語版 5421
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
ード( guard ) を使用することができます。 fn main() { let pair = (2, -2); // TODO ^ Try different values for...
you must use the _ pattern at the end. fn main() { let number: u8 = 4; match number { i if i == 0 => prin...
ntln!("Fell through"), // This should not be possible to reach } } 参照 タプル 関連キーワード: ガード , p...
- https://man.plustar.jp/rust/example/flow_control/match/guard.html - [similar]
- read lines - Rust By Example 日本語版 5421
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
ist in current path before this produces output if let Ok(lines) = read_lines("./hosts") { // Consumes th...
eturns an (Optional) String for line in lines { if let Ok(ip) = line { println!("{}", ip); } } } } // The...
ines<io::BufReader<File>>> where P: AsRef<Path>, { let file = File::open(filename)?; Ok(io::BufReader::ne...
- https://man.plustar.jp/rust/example/std_misc/file/read_lines.html - [similar]
- スレッド - Rust By Example 日本語版 5421
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
ed. // spawnされるクロージャを保持するためのベクタ let mut children = vec![]; for i in 0..NTHREADS { // S...
ult. // 子スレッドが終了するのを待ち、結果を返す。 let _ = child.join(); } } これらのスレッドのスケジュー...
, Result , By , Rust , Example , エラー , Option , let , テストケース...
- https://man.plustar.jp/rust/example/std_misc/threads.html - [similar]
- テストケース: 空トレイト - Rust By Example 日本語版 5367
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
main() { // 訳注: 以下は全て鳥の名前 // 猩々紅冠鳥 let cardinal = Cardinal; // アオカケス let blue_jay =...
BlueJay; // 七面鳥 let _turkey = Turkey; // `red()` won't work on a blue...
- https://man.plustar.jp/rust/example/generics/bounds/testcase_empty.html - [similar]
- ジェネリックトレイト - Rust By Example 日本語版 5367
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
方を drop するようなメソッドにします。 // Non-copyable types. // コピー不可な型 // 訳注: `clone()`メソッド...
放する。 fn double_drop(self, _: T) {} } fn main() { let empty = Empty; let null = Null; // Deallocate `emp...
ト , Result , By , Example , Rust , self , エラー , let...
- https://man.plustar.jp/rust/example/generics/gen_trait.html - [similar]
- 圧縮 - Rust By Example 日本語版 5367
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
i32, _: &'b i32) -> &'b i32 { first } fn main() { let first = 2; // Longer lifetime // 長いライフタイム...
{ let second = 3; // Shorter lifetime // 短いライフタイム...
イフタイム , Rust , Example , By , second , エラー , let...
- https://man.plustar.jp/rust/example/scope/lifetime/lifetime_coercion.html - [similar]
- Option - Rust By Example 日本語版 5367
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
変数にアサインする際は、型を明示しなくてはならない。 let none: Option<i32> = None; let _equivalent_none = N...
one::<i32>; let optional_float = Some(0f32); // Unwrapping a `Some...
- https://man.plustar.jp/rust/example/std/option.html - [similar]
- Rc - Rust By Example 日本語版 5367
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
increments the count. use std::rc::Rc; fn main() { let rc_examples = "Rc examples".to_string(); { println...
!("--- rc_a is created ---"); let rc_a: Rc<String> = Rc::new(rc_examples); println!(...
a)); { println!("--- rc_a is cloned to rc_b ---"); let rc_b: Rc<String> = Rc::clone(&rc_a); println!("Ref...
- https://man.plustar.jp/rust/example/std/rc.html - [similar]
- エイリアス - Rust By Example 日本語版 5367
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー...
in() { // `NanoSecond` = `Inch` = `u64_t` = `u64`. let nanoseconds: NanoSecond = 5 as u64_t; let inches:...
, Example , By , type , NanoSecond , nanoseconds , let...
- https://man.plustar.jp/rust/example/types/alias.html - [similar]