検索

phrase: max: clip:
target: order:
Results of 11 - 20 of about 37 for we (0.048 sec.)
Where句 - Rust By Example 日本語版 7940
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... tInOption { fn print_in_option(self); } // Because we would otherwise have to express this as `T: Debug` ... T> PrintInOption for T where Option<T>: Debug { // We want `Option<T>: Debug` as our bound because that ...
https://man.plustar.jp/rust/example/generics/where.html - [similar]
Integration testing - Rust By Example 日本語版 7940
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... test: tests/integration_test.rs : // extern crate we're testing, same as any other code would do. exter ... a separate crate. One way of sharing some code between integration tests is making a module with public ... th test: tests/integration_test.rs // extern crate we're testing, same as any other code will do. extern ...
https://man.plustar.jp/rust/example/testing/integration_testing.html - [similar]
Returning Traits with dyn - Rust By Example 日本語版 7940
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... entations will need different amounts of memory. However, there's an easy workaround. Instead of returni ... n guarantee it points to a heap-allocated Animal , we can return a trait from our function! Rust tries t ... // Returns some struct that implements Animal, but we don't know which one at compile time. fn random_an ...
https://man.plustar.jp/rust/example/trait/dyn.html - [similar]
Combinators: map - Rust By Example 日本語版 7782
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... d(food)), None => None, } } // Cooking food. Here, we showcase `map()` instead of `match` for case handl ... n to peel, chop, and cook food all in sequence. // We chain multiple uses of `map()` to simplify the cod ...
https://man.plustar.jp/rust/example/error/option_unwrap/map.html - [similar]
Resultのmap - Rust By Example 日本語版 7782
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... :ParseIntError; // With the return type rewritten, we use pattern matching without `unwrap()`. // リター ... fn main() { // This still presents a reasonable answer. // ここは以前と変わらず、妥当な解を与えます。 le ... t twenty = multiply("10", "2"); print(twenty); // The fo ... use std::num::ParseIntError; // As with `Option`, we can use combinators such as `map()`. // This funct ...
https://man.plustar.jp/rust/example/error/result/result_map.html - [similar]
Unit testing - Rust By Example 日本語版 7624
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... nctions typically perform some setup, run the code we want to test, then assert whether the results are ... what we expect. Most unit tests go into a tests mod with t ...
https://man.plustar.jp/rust/example/testing/unit_testing.html - [similar]
Raw identifiers - Rust By Example 日本語版 7151
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... use keywords where they would not normally be allowed. This is particularly useful when Rust introduces ... with the same name as a keyword introduced in a newer edition. For example, consider a crate foo compil ... e in the 2018 edition, so without raw identifiers, we would have no way to name the function. extern cra ...
https://man.plustar.jp/rust/example/compatibility/raw_identifiers.html - [similar]
panic - Rust By Example 日本語版 7151
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ch sugary beverages. // Princesses hate snakes, so we need to stop if she disapproves! // 甘すぎる飲み物 ...
https://man.plustar.jp/rust/example/error/panic.html - [similar]
構造体 - Rust By Example 日本語版 7151
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ることもできる。 Foo { y, .. } => println!("y = {}, we don't care about x", y), // this will give an erro ...
https://man.plustar.jp/rust/example/flow_control/match/destructuring/destructure... - [similar]
関数 - Rust By Example 日本語版 7151
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 、関数の定義を行う順番に制限はない。 fn main() { // We can use this function here, and define it somewher ...
https://man.plustar.jp/rust/example/fn.html - [similar]
PREV 1 2 3 4 NEXT