検索

phrase: max: clip:
target: order:
Results of 1 - 1 of about 1 for Chopped (0.004 sec.)
Combinators: map - Rust By Example 日本語版 9414
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... bug)] struct Peeled(Food); #[derive(Debug)] struct Chopped(Food); #[derive(Debug)] struct Cooked(Food); // Pe ... any, then return `None`. // Otherwise, return the chopped food. // 上と同じように、食べ物を切る前に、皮を向い ... 要がある。 fn chop(peeled: Option<Peeled>) -> Option<Chopped> { match peeled { Some(Peeled(food)) => Some(Chopp ... だが`match`の代わりに`map()`を使用している。 fn cook(chopped: Option<Chopped>) -> Option<Cooked> { chopped.map( ...
https://man.plustar.jp/rust/example/error/option_unwrap/map.html - [similar]
PREV 1 NEXT