検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 193 for impl (0.038 sec.)
impl Trait - Rust By Example 日本語版 14515
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... fault) Rust Coal Navy Ayu Rust By Example 日本語版 impl Trait impl Trait can be used in two locations: as ... ait but you don't mind the specific type, you can simplify the function declaration using impl Trait as th ... ent is generic, allowing it to take any type which implements BufRead, such as BufReader<File> or [u8] , b ...
https://man.plustar.jp/rust/example/trait/impl_trait.html - [similar]
メソッド - Rust By Example 日本語版 13689
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... Ayu Rust By Example 日本語版 メソッド 関数と同様、 impl でメソッドを実装する際にもジェネリック型特有の記法 ... type `GenericVal` // ジェネリック型`GenericVal` // impl of GenericVal where we explicitly specify type par ... ラメータを指定したうえで、GenericValにメソッドを実装 impl GenericVal<f32> {} // Specify `f32` // `f32`の場合 ...
https://man.plustar.jp/rust/example/generics/impl.html - [similar]
クロージャを返す関数 - Rust By Example 日本語版 9409
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... その定義上、不明であるため、クロージャを返すためには impl Trait を使用する必要があります。 クロージャを返すた ... ャに残ってしまうのを防ぐためです。 fn create_fn() -> impl Fn() { let text = "Fn".to_owned(); move || println ... !("This is a: {}", text) } fn create_fnmut() -> impl FnMut() { let text = "FnMut".to_owned(); move || p ...
https://man.plustar.jp/rust/example/fn/closures/output_parameters.html - [similar]
Rust By Example 日本語版 8029
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... / The `derive` attribute automatically creates the implementation // required to make this `struct` printa ... ント可能になっています。 // Derive the `fmt::Debug` implementation for `Structure`. `Structure` // is a str ... efine a structure for which `fmt::Display` will be implemented. This is // a tuple struct named `Structure ...
https://man.plustar.jp/rust/example/print.html - [similar]
テストケース: 単位を扱う - Rust By Example 日本語版 7475
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... where RHS defaults to Self if not specified in the implementation. // このように定義しておくと、`Self + RH ... S = Output`であることが保証され、 // かつ、impl時にRHSの型が明示されていない場合、デフォルトでSelfと ... `でなくてはならないので`T<U> + T<U> = T<U>`となる。 impl<U> Add for T<U> { type Output = T<U>; ... } 以下は ...
https://man.plustar.jp/rust/example/generics/phantom/testcase_units.html - [similar]
Traits - Rust By Example 日本語版 7475
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... hods basically are similar to functions. Note that impl may have annotation of lifetimes too. // A struct ... rowed<'a> { x: &'a i32, } // Annotate lifetimes to impl. impl<'a> Default for Borrowed<'a> { fn default() ...
https://man.plustar.jp/rust/example/scope/lifetime/trait.html - [similar]
Disambiguating overlapping traits - Rust By Example 日本語版 7344
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... 本語版 Disambiguating overlapping traits A type can implement many different traits. What if two traits bot ... ferent return types! Good news: because each trait implementation gets its own impl block, it's clear whic ... h trait's get method you're implementing. What about when it comes time to call tho ...
https://man.plustar.jp/rust/example/trait/disambiguating.html - [similar]
Where句 - Rust By Example 日本語版 7203
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... 界に別々に制限を加えたほうが明瞭になる場合 つまり、 impl <A: TraitB + TraitC, D: TraitE + TraitF> MyTrait<A ... lause // `where`を用いてジェネリック境界を設ける。 impl <A, D> MyTrait<A, D> for YourType where A: TraitB ... 直接的でない方法 // を使用するかしなくてはならない。 impl<T> PrintInOption for T where Option<T>: Debug { // ...
https://man.plustar.jp/rust/example/generics/where.html - [similar]
エラーをラップする - Rust By Example 日本語版 6920
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... or { EmptyVec, // We will defer to the parse error implementation for their error. // Supplying extra info ... タを追加する必要があります。 Parse(ParseIntError), } impl fmt::Display for DoubleError { fn fmt(&self, f: &m ... is is a wrapper, so defer to the underlying types' implementation of `fmt`. // ラップされたエラーは追加情報 ...
https://man.plustar.jp/rust/example/error/multiple_error_types/wrap_error.html - [similar]
メソッド - Rust By Example 日本語版 6790
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ーバーロード 16.4. メモリ解放 16.5. イテレータ 16.6. impl Trait 16.7. クローン 16.8. Supertraits 16.9. Disam ... される関数です。 struct Point { x: f64, y: f64, } // Implementation block, all `Point` associated functions ... ク。`Point`の持つ関連関数とメソッドを全て定義する。 impl Point { // This is an "associated function" becaus ... y } } } struct Rectangle { p1: Point, p2: Point, } impl Rectangle { // This is a method // `&self` is suga ...
https://man.plustar.jp/rust/example/fn/methods.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 NEXT