検索
Results of 31 - 40 of about 193 for let (0.071 sec.)
- クローン - Rust By Example 日本語版 6127
- 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. クロー...
/ Instantiate `Unit` // `Unit`のインスタンスを作成 let unit = Unit; // Copy `Unit`, there are no resource...
move // `Unit`をコピー、移動させる資源は存在しない let copied_unit = unit; // Both `Unit`s can be used in...
/ Instantiate `Pair` // `Pair`のインスタンスを作成 let pair = Pair(Box::new(1), Box::new(2)); println!("o...
- https://man.plustar.jp/rust/example/trait/clone.html - [similar]
- リテラル - Rust By Example 日本語版 6127
- 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 x = 1u8; let y = 2u32; let z = 3f32; // Unsuffixed...
ックスを指定しないリテラル。型は使用方法に依存する。 let i = 1; let f = 1.0; // `size_of_val` returns the s...
関連キーワード: size , リテラル , 関数 , val , mem , let , Result , bytes , Example , Rust...
- https://man.plustar.jp/rust/example/types/literals.html - [similar]
- 安全でない操作 - Rust By Example 日本語版 6127
- 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 raw_p: *const u32 = &10; unsafe { assert!(*raw_p =...
element and a length. use std::slice; fn main() { let some_vector = vec![1, 2, 3, 4]; let pointer = some...
_vector.as_ptr(); let length = some_vector.len(); unsafe { let my_slice:...
- https://man.plustar.jp/rust/example/unsafe.html - [similar]
- ?の他の活用法 - Rust By Example 日本語版 6073
- 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 double_first(vec: Vec<&str>) -> Result<i32> { let first = vec.first().ok_or(EmptyVec)?; let parsed =...
rr(e) => println!("Error: {}", e), } } fn main() { let numbers = vec!["42", "93", "18"]; let empty = vec!...
[]; let strings = vec!["tofu", "93", "18"]; print(double_f...
- https://man.plustar.jp/rust/example/error/multiple_error_types/reenter_question_... - [similar]
- チャネル - Rust By Example 日本語版 6073
- 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 (tx, rx): (Sender<i32>, Receiver<i32>) = mpsc::cha...
nnel(); let mut children = Vec::new(); for id in 0..NTHREADS {...
// 送信者エンドポイントはコピーすることができる。 let thread_tx = tx.clone(); // Each thread will send i...
- https://man.plustar.jp/rust/example/std_misc/channels.html - [similar]
- ポインタとref - Rust By Example 日本語版 6019
- 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 reference = &4; match reference { // If `reference...
ていたのでリファレンスでしたが、 // これは違います。 let _not_a_reference = 3; // Rust provides `ref` for e...
のリファレンスが作られて、それが束縛対象になります。 let ref _is_a_reference = 3; // Accordingly, by defini...
- https://man.plustar.jp/rust/example/flow_control/match/destructuring/destructure... - [similar]
- スタティックライフタイム - Rust By Example 日本語版 6019
- 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. クロー...
とがあります。 // A reference with 'static lifetime: let s: &'static str = "hello world"; // 'static as par...
/ 文字列リテラルを用いて変数を作成し、プリントする let static_string = "I'm in read-only memory"; println...
// `coerce_static`関数を呼び出すために、整数を作成 let lifetime_num = 9; // Coerce `NUM` to lifetime of `...
- https://man.plustar.jp/rust/example/scope/lifetime/static_lifetime.html - [similar]
- 所有権とムーブ - Rust By Example 日本語版 6019
- 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. クロー...
に注意しましょう。(e.g. 参照 ) 変数をアサインする( let x = y )際や、関数に引数を値渡しする( foo(x) )際は、...
k_ allocated integer // _スタック_上に置かれた整数 let x = 5u32; // *Copy* `x` into `y` - no resources ar...
y`に *コピー* する。元の値が移動するわけではない。 let y = x; // Both values can be independently used //...
- https://man.plustar.jp/rust/example/scope/move.html - [similar]
- 複数のエラー型 - Rust By Example 日本語版 5964
- 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 double_first(vec: Vec<&str>) -> i32 { let first = vec.first().unwrap(); // Generate error 1...
// Generate error 2 // エラー2の生成 } fn main() { let numbers = vec!["42", "93", "18"]; let empty = vec!...
[]; let strings = vec!["tofu", "93", "18"]; println!("The...
- https://man.plustar.jp/rust/example/error/multiple_error_types.html - [similar]
- if/else - Rust By Example 日本語版 5964
- 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 n = 5; if n < 0 { print!("{} is negative", n); } e...
positive", n); } else { print!("{} is zero", n); } let big_n = if n < 10 && n > -10 { println!(", and is...
}; // ^ Don't forget to put a semicolon here! All `let` bindings need it. // ここにセミコロンを付けるのを...
- https://man.plustar.jp/rust/example/flow_control/if_else.html - [similar]