検索

phrase: max: clip:
target: order:
Results of 11 - 20 of about 20 for pub (0.032 sec.)
New Type Idiom - Rust By Example 日本語版 7936
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... struct Years(i64); struct Days(i64); impl Years { pub fn to_days(&self) -> Days { Days(self.0 * 365) } } ... impl Days { /// truncates partial years pub fn to_years(&self) -> Years { Years(self.0 / 365) ...
https://man.plustar.jp/rust/example/generics/new_types.html - [similar]
use宣言 - Rust By Example 日本語版 7936
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... { println!("called `function()`"); } mod deeply { pub mod nested { pub fn function() { println!("called ...
https://man.plustar.jp/rust/example/mod/use.html - [similar]
Integration testing - Rust By Example 日本語版 7936
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... tests are external to your crate and use only its public interface in the same way any other code would. ... adder, will have to extern it in integration test. pub fn add(a: i32, b: i32) -> i32 { a + b } File with ... between integration tests is making a module with public functions, importing and using it within tests. ... File tests/common.rs : pub fn setup() { // some setup code, like creating req ...
https://man.plustar.jp/rust/example/testing/integration_testing.html - [similar]
? - Rust By Example 日本語版 7494
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... will be `return`ed let ln = ln(ratio)?; sqrt(ln) } pub fn op(x: f64, y: f64) { match op_(x, y) { Err(why) ...
https://man.plustar.jp/rust/example/std/result/question_mark.html - [similar]
Dev-dependencies - Rust By Example 日本語版 7494
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... est)] #[macro_use] extern crate pretty_assertions; pub fn add(a: i32, b: i32) -> i32 { a + b } #[cfg(test ...
https://man.plustar.jp/rust/example/testing/dev_dependencies.html - [similar]
Iterator::any - Rust By Example 日本語版 7409
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... lse を返すイテレータです。以下がそのシグネチャです pub trait Iterator { // The type being iterated over. ...
https://man.plustar.jp/rust/example/fn/closures/closure_examples/iter_any.html - [similar]
Iterator::find - Rust By Example 日本語版 7409
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... e を返します。型シグネチャは以下のようになります。 pub trait Iterator { // The type being iterated over. ...
https://man.plustar.jp/rust/example/fn/closures/closure_examples/iter_find.html - [similar]
テストケース: 単位を扱う - Rust By Example 日本語版 7409
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... されていない場合、デフォルトでSelfと同じに // なる。 pub trait Add<RHS = Self> { type Output; fn add(self, ...
https://man.plustar.jp/rust/example/generics/phantom/testcase_units.html - [similar]
識別子 - Rust By Example 日本語版 7409
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ークンツリー ) ty ( 型 ) vis ( 可視性修飾子 )(訳注: pub (crate) とか) 完全なリストを見るには、 Rustリファ ...
https://man.plustar.jp/rust/example/macros/designators.html - [similar]
Rust By Example 日本語版 7239
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... lse を返すイテレータです。以下がそのシグネチャです pub trait Iterator { // The type being iterated over. ... e を返します。型シグネチャは以下のようになります。 pub trait Iterator { // The type being iterated over. ...
https://man.plustar.jp/rust/example/print.html - [similar]
PREV 1 2 NEXT