検索
Results of 1 - 10 of about 90 for 参照 (0.004 sec.)
- Rust By Example 日本語版 14681
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...+ */ 5; println!("Is `x` 10 or 100? x = {}", x); } 参照 ライブラリドキュメンテーション フォーマットしてプリ...td::fmt をチェックする必要があるかもしれません。) 参照 std::fmt , マクロ , 構造体 , トレイト デバッグ std...を実装することでプリント結果を思い通りにできます。 参照 アトリビュート , derive , std::fmt , 構造体 ディス...それぞれに独自の実装が必要です。詳しくは std::fmt を参照してください。 演習 上記の例のアウトプットを確認し、... - https://man.plustar.jp/rust/example/print.html - [similar]
- 関数 - Rust By Example 日本語版 12134
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...てライフタイムを明示しなくてはならない。 返り値となる参照はすべて引数と同じライフタイムか、 static ライフタイ...ムを持たなくてはならない 加えて、引数のない関数から参照を返す場合、それが結果的に無効なデータへの参照になる...as the function. // 引数として`'a`のライフタイムで参照を一つ取る。最低でもこの関数 // と同じだけの長さでな...possible with lifetimes as well. // ミュータブルな参照でも同様 fn add_one<'a>(x: &'a mut i32) { *x += 1; }... - https://man.plustar.jp/rust/example/scope/lifetime/fn.html - [similar]
- ライフタイム境界 - Rust By Example 日本語版 10147
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...の意味をチェックしてください。 T: 'a : T 内の 全ての 参照は 'a よりも長生きでなくてはならない T: Trait + 'a :...a`というライフタイムを持つジェネリック型`T`に対する参照を持ち、 // `T`の値に対する *参照* は必ず`'a`よりも長...tlive the function. // `Debug`を実装している`T`への参照を取る。`T`への *参照* は // 必ず`'a`よりも長生きでな...ef_x = Ref(&x); print_ref(&ref_x); print(ref_x); } 参照 ジェネリクス , ジェネリック境界 , 境界が複数の場合... - https://man.plustar.jp/rust/example/scope/lifetime/lifetime_bounds.html - [similar]
- 明示的アノテーション - Rust By Example 日本語版 9867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...mple 日本語版 明示的アノテーション 借用チェッカーは参照がどれだけの間有効かを決定するために、明示的なアノテ...します。ライフタイムが省略 1 されなかった場合、Rustは参照のライフタイムがどのようなものであるか、明示的なアノ...e function `print_refs`. // `print_refs`は`i32`への参照を2つとり、それぞれ`'a`と`'b`という // ライフタイムを...とすると失敗する。つまり、短いライフタイム // を持つ参照をより長いものに強制的に代入することはできない。 } f... - https://man.plustar.jp/rust/example/scope/lifetime/explicit.html - [similar]
- 構造体 - Rust By Example 日本語版 9867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...ence to `i32` must outlive `Borrowed`. // `i32`への参照をメンバに持つ`Borrowed`型。 // 参照は`Borrowed`自体...re must outlive this structure. // 同様に、ここでも参照は構造体よりも長生きでなくてはならない。 #[derive(De...or a reference to one. // `i32`、あるいは`i32`への参照のいずれかとなる列挙型 #[derive(Debug)] enum Either<...println!("y is *not* borrowed in {:?}", number); } 参照 struct s 関連キーワード: 関数 , let , Result , Bor... - https://man.plustar.jp/rust/example/scope/lifetime/struct.html - [similar]
- 捕捉時の型推論 - Rust By Example 日本語版 8587
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...ん。 制限の少ない順に並べると、下記の通りです。 Fn : 参照( &T )によって捕捉するクロージャ FnMut : ミュータブ...ルな参照( &mut T )によって捕捉するクロージャ FnOnce : 値( T...`farewell` by value. // 変数を2つ補足。`greeting`は参照を、 // `farewell`は値をそれぞれ捕捉する。 let diary...ng` is by reference: requires `Fn`. // `greeting`は参照なので、`Fn`が必要。 println!("I said {}.", greeting... - https://man.plustar.jp/rust/example/fn/closures/input_parameters.html - [similar]
- 要素の捕捉 - Rust By Example 日本語版 8307
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...ためですが、この仕組みのおかげでユースケースに応じて参照を取得したり値そのものを取得したりといった動作が可能...`print`がスコープから出るまで続く。 // `println!`は参照を与えれば機能するので、これ以上なにかする必要はない.../ これはクロージャが`color`に対するイミュータブルな参照しか保持しないからである。 let _reborrow = &color; p...リック型)を取る必要があるため、このクロージャは // 参照ではなく値を取る。その場合、もしもコピー可能な値なら... - https://man.plustar.jp/rust/example/fn/closures/capture.html - [similar]
- ミュータビリティ - Rust By Example 日本語版 8160
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...な形で)借用することができます。これは ミュータブルな参照 と呼ばれ、読み込み・書き込みの権限を借用者に与えま...す。対照的に &T はデータをイミュータブルな参照を介して借用し、借用した側はデータを読み込みはできま...ry // `&'static str`はread-onlyメモリ上の文字列への参照 author: &'static str, title: &'static str, year: u...line // FIXME ^ この行をコメントアウトしましょう } 参照 static 関連キーワード: 関数 , ミュータブル , ミュー... - https://man.plustar.jp/rust/example/scope/borrow/mut.html - [similar]
- 定数 - Rust By Example 日本語版 7600
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...ccess constant in some function // 関数内から定数を参照 n > THRESHOLD } fn main() { let n = 16; // Access...stant in the main thread // main 関数の中から定数を参照 println!("This is {}", LANGUAGE); println!("The th...line // FIXME ^ この行をコメントアウトしましょう } 参照 const 及び static の RFC , 'static ライフタイム 関... - https://man.plustar.jp/rust/example/custom_types/constants.html - [similar]
- クロージャを返す関数 - Rust By Example 日本語版 7600
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...示しなければなりません。 これは、関数を抜けると同時に参照による捕捉がドロップされ、無効な参照がクロージャに残...reate_fnonce(); fn_plain(); fn_mut(); fn_once(); } 参照 Fn , FnMut , ジェネリクス , impl Trait . 関連キーワ... - https://man.plustar.jp/rust/example/fn/closures/output_parameters.html - [similar]