検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 19 for 失敗 (0.023 sec.)
Result - Rust By Example 日本語版 14428
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... yu Rust By Example 日本語版 Result これまでの例で、失敗する可能性のある関数の返り値として、列挙型 Option が ... 使用でき、失敗時の返り値には None を用いることを見てきました。しか ... し、時には なぜ そのオペレーションが失敗したのかを明示することが重要な場合があります。そのた ... を持ちます。) Err(why) ... これはオペレーションの失敗を意味します。 why をラップしており、ここには失敗した ...
https://man.plustar.jp/rust/example/std/result.html - [similar]
Option - Rust By Example 日本語版 10245
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... Rust By Example 日本語版 Option プログラムの一部が失敗した際、 panic! するよりも、エラーを補足する方が望ま ... tion<T> には2つの値があります。 None 、これは実行の失敗か値の欠如を示します。 Some(value) 、型 T の value を ... // Failure is represented as the `None` variant // 失敗は`None`としてあらわされる。 None } else { // Result ... ndles a division that may not succeed // この関数は失敗する割り算を扱うことができる fn try_division(dividen ...
https://man.plustar.jp/rust/example/std/option.html - [similar]
Resultをイテレートする - Rust By Example 日本語版 10057
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... Result をイテレートする Iter::map オペレーションは失敗することもあります。例えば、 fn main() { let strings ... 対処法についてみてみましょう。 filter_map() を使って失敗した要素のみを無視する filter_map は関数を呼び出し、 ... "Results: {:?}", numbers); } collect() で処理全体を失敗させる Result は、それらのベクトル( Vec<Result<T, E> ... こともできます。 partition() を使って全ての正常な値と失敗をまとめる fn main() { let strings = vec!["tofu", "9 ...
https://man.plustar.jp/rust/example/error/iter_result.html - [similar]
if let - Rust By Example 日本語版 9869
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... せんか? }; } この場合は if let を用いたほうが美しく、失敗時の処理も柔軟に行うことができます。 fn main() { // ... failed. Change to the failure case. // デストラクト失敗の場合。このブロック内を実行 println!("Didn't match ... ovide an altered failing condition. // デストラクト失敗時の処理を更に分岐させることもできる let i_like_lett ... ate failure branch should be taken: // デストラクト失敗。`else if`を評価し、処理をさらに分岐させる。 } else ...
https://man.plustar.jp/rust/example/flow_control/if_let.html - [similar]
Result - Rust By Example 日本語版 9152
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 必ずしも成功する訳ではないため、 Result を返すことで失敗するケースについてもカバーできるのです。 早速、文字列 ... を parse() した場合の成功例と失敗例を見てみましょう。 fn multiply(first_number_str: & ... ultiply("t", "2"); println!("double is {}", tt); } 失敗例では、 parse() がエラーを返すため unwrap() がパニッ ...
https://man.plustar.jp/rust/example/error/result.html - [similar]
エラーハンドリング - Rust By Example 日本語版 9152
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 日本語版 エラーハンドリング エラーハンドリングとは失敗の起きる可能性を扱うプロセスのことです。例えば、ファ ... イルを読み込むのに失敗した際、その 誤った インプットを使い続けるのは明らか ... いでしょう。テストにおいては panic は明示的にテストを失敗させるための良い手法になるでしょう。 Option 型は値が ...
https://man.plustar.jp/rust/example/error.html - [similar]
Rust By Example 日本語版 8418
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... れた一連のメソッドです。 マクロ エラーハンドリング - 失敗に対処するRust流のやり方を学びましょう。 標準ライブラ ... From / Into と異なり、 TryFrom / TryInto トレイトは失敗する可能性のある型変換に用いられるので、 Result を返 ... せんか? }; } この場合は if let を用いたほうが美しく、失敗時の処理も柔軟に行うことができます。 fn main() { // ... failed. Change to the failure case. // デストラクト失敗の場合。このブロック内を実行 println!("Didn't match ...
https://man.plustar.jp/rust/example/print.html - [similar]
ファイル I/O - Rust By Example 日本語版 8418
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 両方を提供します。 これはI/Oに関するオペレーションの失敗をより明瞭にします。このおかげでプログラマは直面した ...
https://man.plustar.jp/rust/example/std_misc/file.html - [similar]
while let - Rust By Example 日本語版 8247
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... loop when the destructure fails: // デストラクトに失敗した場合、ループを脱出 _ => { break; } // ^ Why shou ... failing case. // ^ インデントが少なく、デストラクト失敗時の処理を追加で書く必要がない。 } // ^ `if let` had ...
https://man.plustar.jp/rust/example/flow_control/while_let.html - [similar]
TryFromおよびTryInto - Rust By Example 日本語版 7513
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... From / Into と異なり、 TryFrom / TryInto トレイトは失敗する可能性のある型変換に用いられるので、 Result を返 ...
https://man.plustar.jp/rust/example/conversion/try_from_try_into.html - [similar]
PREV 1 2 NEXT