検索

phrase: max: clip:
target: order:
Results of 11 - 12 of about 12 for NUM (0.026 sec.)
エラーをラップする - Rust By Example 日本語版 7835
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... e std::error; use std::error::Error as _; use std::num::ParseIntError; use std::fmt; type Result<T> = std ... :result::Result<T, DoubleError>; #[derive(Debug)] enum DoubleError { EmptyVec, // We will defer to the pa ... Caused by: {}", source); } }, } } fn main() { let numbers = vec!["42", "93", "18"]; let empty = vec![]; ... ngs = vec!["tofu", "93", "18"]; print(double_first(numbers)); print(double_first(empty)); print(double_fi ...
https://man.plustar.jp/rust/example/error/multiple_error_types/wrap_error.html - [similar]
Result - Rust By Example 日本語版 7835
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... の成功例と失敗例を見てみましょう。 fn multiply(first_number_str: &str, second_number_str: &str) -> i32 { // ... Let's try using `unwrap()` to get the number out. Will it bite us? // `unwrap()`で数字を取り ... 出してみましょう。痛い目を見るでしょうか? let first_number = first_number_str.parse::<i32>().unwrap(); let ... second_number = second_number_str.parse::<i32>().unwrap(); fi ...
https://man.plustar.jp/rust/example/error/result.html - [similar]
PREV 1 2 NEXT