検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 193 for type (0.027 sec.)
impl Trait - Rust By Example 日本語版 11582
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... Trait can be used in two locations: as an argument type as a return type As an argument type If your funct ... neric over a trait but you don't mind the specific type, you can simplify the function declaration using i ... mpl Trait as the type of the argument. For example, consider the followi ...
https://man.plustar.jp/rust/example/trait/impl_trait.html - [similar]
関数 - Rust By Example 日本語版 11201
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... B, ...>() のようになります。 struct A; // Concrete type `A`. // 具象型`A`. struct S(A); // Concrete type ` ... S`. // 具象型`S`. struct SGen<T>(T); // Generic type `SGen`. // ジェネリック型`SGen`. // The following ... a function `reg_fn` that takes an argument `_s` of type `S`. // This has no `<T>` so this is not a generic ...
https://man.plustar.jp/rust/example/generics/gen_fn.html - [similar]
Rust By Example 日本語版 10441
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... を消去してから実行してください /* * This is another type of comment, a block comment. In general, * line co ... t a suffix, 31 becomes an i32. You can change what type 31 is // by providing a suffix. The number 31i64 f ... or example has the type i64. // サフィックスで型を指定しなければ31はi32とし ...
https://man.plustar.jp/rust/example/print.html - [similar]
関連型 - Rust By Example 日本語版 9843
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... { // `A` and `B` are defined in the trait via the `type` keyword. // (Note: `type` in this context is diff ... erent from `type` when used for // aliases). // `A`と`B`は`type`キー ... ト内で宣言されている。 // (注意: この文脈で使用する`type`は型エイリアスを宣言する際の`type`とは // 異なるこ ...
https://man.plustar.jp/rust/example/generics/assoc_items/types.html - [similar]
Diverging functions - Rust By Example 日本語版 9615
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... eturn. They are marked using ! , which is an empty type. #![allow(unused)] fn main() { fn foo() -> ! { pan ... never returns."); } } As opposed to all the other types, this one cannot be instantiated, because the set ... of all possible values this type can have is empty. Note that, it is different from ...
https://man.plustar.jp/rust/example/fn/diverging.html - [similar]
幽霊型パラメータ - Rust By Example 日本語版 9235
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... y Example 日本語版 幽霊型パラメータ 幽霊型(Phantom Type)とは実行時には存在しないけれども、コンパイル時に静 ... derive(PartialEq)] // Allow equality test for this type. // 比較演算子(`==`)での比較を可能にする。 struct ... PhantomTuple<A, B>(A,PhantomData<B>); // A phantom type struct which is generic over `A` with hidden param ...
https://man.plustar.jp/rust/example/generics/phantom.html - [similar]
ジェネリクス - Rust By Example 日本語版 9007
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... he simplest and most common use of generics is for type parameters. ジェネリック型の型パラメータにはかぎ括 ... リック型の構文を体験していきましょう。 // A concrete type `A`. // `A`という具象型 struct A; // In defining t ... he type `Single`, the first use of `A` is not preceded by ...
https://man.plustar.jp/rust/example/generics.html - [similar]
テストケース: 単位を扱う - Rust By Example 日本語版 7942
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... Selfと同じに // なる。 pub trait Add<RHS = Self> { type Output; fn add(self, rhs: RHS) -> Self::Output; } ... T<U> + T<U> = T<U>`となる。 impl<U> Add for T<U> { type Output = T<U>; ... } 以下は全体を示した例です。: u ... mData; /// Create void enumerations to define unit types. /// 単位を定義するため、空の列挙型を作成。 #[der ...
https://man.plustar.jp/rust/example/generics/phantom/testcase_units.html - [similar]
基本データ型 - Rust By Example 日本語版 7942
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... 3] など タプル: e.g. (1, true) 変数は常に 型指定( type annotate )可能 です。数値型の場合はさらにサフィック ... することもできます。 fn main() { // Variables can be type annotated. // 変数に型を指定 let logical: bool = t ... 0; // `f64` let default_integer = 7; // `i32` // A type can also be inferred from context // 型を文脈から推 ...
https://man.plustar.jp/rust/example/primitives.html - [similar]
New Type Idiom - Rust By Example 日本語版 7790
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要になる状況 ... t) Rust Coal Navy Ayu Rust By Example 日本語版 New Type Idiom The newtype idiom gives compile time guarant ... ees that the right type of value is supplied to a program. For example, an ... that checks age in years, must be given a value of type Years . struct Years(i64); struct Days(i64); impl ...
https://man.plustar.jp/rust/example/generics/new_types.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 NEXT