検索

phrase: max: clip:
target: order:
Results of 1 - 1 of about 1 for SingleGen (0.003 sec.)
ジェネリクス - Rust By Example 日本語版 9414
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... // Here, `<T>` precedes the first use of `T`, so `SingleGen` is a generic type. // Because the type parameter ... T>`が一番初めの`T`の使用よりも先に来ている。よって`SingleGen`はジェネリック型 // となる。なぜならば型パラメータ ... // 上で定義した`A`を受け取ることもできる。 struct SingleGen<T>(T); fn main() { // `Single` is concrete and exp ... = Single(A); // Create a variable `_char` of type `SingleGen<char>` // and give it the value `SingleGen('a')`. ...
https://man.plustar.jp/rust/example/generics.html - [similar]
PREV 1 NEXT