検索

phrase: max: clip:
target: order:
Results of 1 - 9 of about 9 for val (0.052 sec.)
メソッド - Rust By Example 日本語版 12061
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... S; // Concrete type `S` // 具象型`S` struct GenericVal<T>(T); // Generic type `GenericVal` // ジェネリック ... 型`GenericVal` // impl of GenericVal where we explicitly specify ... arameters: // 型パラメータを指定したうえで、GenericValにメソッドを実装 impl GenericVal<f32> {} // Specify ... `f32` // `f32`の場合のメソッド impl GenericVal<S> {} // Specify `S` as defined above // 上で定義し ...
https://man.plustar.jp/rust/example/generics/impl.html - [similar]
リテラル - Rust By Example 日本語版 10892
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 方法に依存する。 let i = 1; let f = 1.0; // `size_of_val` returns the size of a variable in bytes // `size_ ... of_val` 関数は変数のサイズをバイトで返す。 println!("size ... of `x` in bytes: {}", std::mem::size_of_val(&x)); println!("size of `y` in bytes: {}", std::me ... m::size_of_val(&y)); println!("size of `z` in bytes: {}", std::me ...
https://man.plustar.jp/rust/example/types/literals.html - [similar]
ポインタとref - Rust By Example 日本語版 10713
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... e { // If `reference` is pattern matched against `&val`, it results // in a comparison like: // 上で定義し ... た`reference`という変数が`&val`とのパターンマッチ // に用いられた場合、以下の2つの ... 値が比較されていることになる。 // `&i32` // `&val` // ^ We see that if the matching `&`s are dropped ... , then the `i32` // should be assigned to `val`. // ^ よって`&`を落とせば、`i32`が`val`にアサイン ...
https://man.plustar.jp/rust/example/flow_control/match/destructuring/destructure... - [similar]
Box, スタックとヒープ - Rust By Example 日本語版 9454
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... oint occupies {} bytes on the stack", mem::size_of_val(&point)); println!("Rectangle occupies {} bytes on ... the stack", mem::size_of_val(&rectangle)); // box size == pointer size // ボック ... oint occupies {} bytes on the stack", mem::size_of_val(&boxed_point)); println!("Boxed rectangle occupies ... {} bytes on the stack", mem::size_of_val(&boxed_rectangle)); println!("Boxed box occupies { ...
https://man.plustar.jp/rust/example/std/box.html - [similar]
Rust By Example 日本語版 8825
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 返す。そうでなければ実行を継続する。 write!(f, "{}", value)?; Alternatively, you can also use the try! macr ... . Using try! looks like this: try!(write!(f, "{}", value)); ? を使用できれば、 Vec 用の fmt::Display はよ ... ut fmt::Formatter) -> fmt::Result { // Extract the value using tuple indexing, // and create a reference ... Close the opened bracket and return a fmt::Result value. // 開きっぱなしのブラケットを閉じて、`fmt::Resu ...
https://man.plustar.jp/rust/example/print.html - [similar]
Domain Specific Languages (ドメイン特化言語、DSLs) - Rust By Example 日本語版 7369
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... されるようにしたいです。 macro_rules! calculate { (eval $e:expr) => {{ { let val: usize = $e; // Force typ ... 型を整数に制約 println!("{} = {}", stringify!{$e}, val); } }}; } fn main() { calculate! { eval 1 + 2 // h ... ehehe `eval` is _not_ a Rust keyword! // `eval`はRustのキーワー ... ド *じゃない* よね! } calculate! { eval (1 + 2) * (3 / 4) } } 出力はこうなります: 1 + 2 = ...
https://man.plustar.jp/rust/example/macros/dsl.html - [similar]
可変個引数 - Rust By Example 日本語版 7369
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ことができます: macro_rules! calculate { // 単一の`eval`のためのパターン // The pattern for a single `eval ... ` (eval $e:expr) => {{ { let val: usize = $e; // Force typ ... to be integers println!("{} = {}", stringify!{$e}, val); } }}; // 複数の`eval`を再帰的に分解する // Decom ... pose multiple `eval`s recursively (eval $e:expr, $(eval $es:expr),+) = ...
https://man.plustar.jp/rust/example/macros/variadics.html - [similar]
クロージャ - Rust By Example 日本語版 7279
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 例えば、次のコードは変数xを捕捉したクロージャです。 |val| val + x クロージャの構文や機能は、その場限りの用途 ...
https://man.plustar.jp/rust/example/fn/closures.html - [similar]
配列とスライス - Rust By Example 日本語版 6830
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 5]; // All elements can be initialized to the same value // すべての要素を0にする場合 let ys: [i32; 500] ... る println!("array occupies {} bytes", mem::size_of_val(&xs)); // Arrays can be automatically borrowed as ...
https://man.plustar.jp/rust/example/primitives/array.html - [similar]
PREV 1 NEXT