検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 14 for tuple (0.024 sec.)
タプル - Rust By Example 日本語版 14266
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... んので、関数が複数の値を返したい時に使われます。 // Tuples can be used as function arguments and as return v ... 2) { // `let` can be used to bind the members of a tuple to variables // `let`でタプルの中の値を別の変数に束 ... truct Matrix(f32, f32, f32, f32); fn main() { // A tuple with a bunch of different types // 様々な型を値に持 ... つタプル let long_tuple = (1u8, 2u16, 3u32, 4u64, -1i8, -2i16, -3i32, -4i6 ...
https://man.plustar.jp/rust/example/primitives/tuples.html - [similar]
refパターン - Rust By Example 日本語版 10275
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ", mutable_point.x, mutable_point.y); // A mutable tuple that includes a pointer // ポインタを含むミュータブ ... ルなタプル let mut mutable_tuple = (Box::new(5u32), 3u32); { // Destructure `mutabl ... e_tuple` to change the value of `last`. // `mutable_tuple` ... て、`last`の値を変更 let (_, ref mut last) = mutable_tuple; *last = 2u32; } println!("tuple is {:?}", mutable ...
https://man.plustar.jp/rust/example/scope/borrow/ref.html - [similar]
Rust By Example 日本語版 10205
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... h `fmt::Display` will be implemented. This is // a tuple struct named `Structure` that contains an `i32`. / ... atter) -> fmt::Result { // Extract the value using tuple indexing, // and create a reference to `vec`. let ... んので、関数が複数の値を返したい時に使われます。 // Tuples can be used as function arguments and as return v ... 2) { // `let` can be used to bind the members of a tuple to variables // `let`でタプルの中の値を別の変数に束 ...
https://man.plustar.jp/rust/example/print.html - [similar]
構造体 - Rust By Example 日本語版 8770
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... , } // A unit struct // ユニット struct Unit; // A tuple struct // タプル struct Pair(i32, f32); // A struc ... をインスタンス化 let _unit = Unit; // Instantiate a tuple struct // タプルをインスタンス化 let pair = Pair(1 ... , 0.1); // Access the fields of a tuple struct // タプルのフィールドにアクセス println!("p ... {:?} and {:?}", pair.0, pair.1); // Destructure a tuple struct // タプルをデストラクト let Pair(integer, d ...
https://man.plustar.jp/rust/example/custom_types/structs.html - [similar]
継承(Derive) - Rust By Example 日本語版 8472
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... をフォーマットするためのトレイト // `Centimeters`, a tuple struct that can be compared // `Centimeters`は比較 ... rtialOrd)] struct Centimeters(f64); // `Inches`, a tuple struct that can be printed // `Inches`はプリント可 ... timeters(inches as f64 * 2.54) } } // `Seconds`, a tuple struct with no additional attributes // `Seconds`に ...
https://man.plustar.jp/rust/example/trait/derive.html - [similar]
タプル - Rust By Example 日本語版 8174
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... }", triple); // Match can be used to destructure a tuple // `match`を用いてタプルをデストラクトしてみましょ ... r"), // `..` can be used to ignore the rest of the tuple _ => println!("It doesn't matter what they are"), ...
https://man.plustar.jp/rust/example/flow_control/match/destructuring/destructure... - [similar]
New Type Idiom - Rust By Example 日本語版 8174
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... newtype 's value as the base type, you may use the tuple or destructuring syntax like so: struct Years(i64) ... s(42); let years_as_primitive_1: i64 = years.0; // Tuple let Years(years_as_primitive_2) = years; // Destru ...
https://man.plustar.jp/rust/example/generics/new_types.html - [similar]
テストケース: 連結リスト - Rust By Example 日本語版 7719
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... あります。 use crate::List::*; enum List { // Cons: Tuple struct that wraps an element and a pointer to the ...
https://man.plustar.jp/rust/example/custom_types/enum/testcase_linked_list.html - [similar]
列挙型 - Rust By Example 日本語版 7719
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 型はユニット風でもよい PageLoad, PageUnload, // like tuple structs, // タプル風でもよい KeyPress(char), Paste ...
https://man.plustar.jp/rust/example/custom_types/enum.html - [similar]
幽霊型パラメータ - Rust By Example 日本語版 7719
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... します。 use std::marker::PhantomData; // A phantom tuple struct which is generic over `A` with hidden param ... 比較演算子(`==`)での比較を可能にする。 struct PhantomTuple<A, B>(A,PhantomData<B>); // A phantom type struct ... 32` and `f64` are the hidden parameters. // PhantomTuple type specified as `<char, f32>`. // <char, f32>と型 ... 宣言されたPhantomTupleを作成 let _tuple1: PhantomTuple<char, f32> = Phanto ...
https://man.plustar.jp/rust/example/generics/phantom.html - [similar]
PREV 1 2 NEXT