検索
Results of 1 - 10 of about 15 for mutable (0.004 sec.)
- refパターン - Rust By Example 日本語版 12191
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...の`x`フィールドへのコピーを返す。 *ref_to_x }; // A mutable copy of `point` // `point`へのミュータブルなコピー...let mut mutable_point = point; { // `ref` can be paired with `mut`...to take mutable references. // `ref`は`mut`とともに使い、ミュータブ...きる。 let Point { x: _, y: ref mut mut_ref_to_y } = mutable_point; // Mutate the `y` field of `mutable_point`... - https://man.plustar.jp/rust/example/scope/borrow/ref.html - [similar]
- 値の凍結 - Rust By Example 日本語版 11668
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...プ外になるまで変更できません。 fn main() { let mut _mutable_integer = 7i32; { // Shadowing by immutable `_muta...ble_integer` // イミュータブルな`_mutable_integer`でシャドーイングする let _mutable_integer...= _mutable_integer; // Error! `_mutable_integer` is frozen in...this scope // エラー! `_mutable_integer`はこのスコープでは凍結している。 _mutable_... - https://man.plustar.jp/rust/example/variable_bindings/freeze.html - [similar]
- エイリアス - Rust By Example 日本語版 11477
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...row.y, point.z); // Error! Can't borrow `point` as mutable because it's currently // borrowed as immutable. /...、 // ミュータブルに借用することができない。 // let mutable_borrow = &mut point; // TODO ^ Try uncommenting th...owed_point.x, another_borrow.y, point.z); // The immutable references are no longer used for the rest of the...code so // it is possible to reborrow with a mutable reference. let mutable_borrow = &mut point; // Cha... - https://man.plustar.jp/rust/example/scope/borrow/alias.html - [similar]
- Rust By Example 日本語版 9317
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...容に基づいて推定 inferred_type = 4294967296i64; // A mutable variable's value can be changed. // ミュータブルな...変数は値を変更できる let mut mutable = 12; // Mutable `i32` // ミュータブルな `i32`. mu...changed. // エラー! ミュータブルな変数でも型は不変 mutable = true; // Variables can be overwritten with shado...g. // 変数はシャドーイングによって上書きできる let mutable = true; } 参照 std ライブラリ , mut , inference ,... - https://man.plustar.jp/rust/example/print.html - [similar]
- ミュータビリティ - Rust By Example 日本語版 9247
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...所有権を移譲した際に変更できます。 fn main() { let immutable_box = Box::new(5u32); println!("immutable_box cont...ains {}", immutable_box); // Mutability error // ミュータビリティエラー...//*immutable_box = 4; // *Move* the box, changing the ownership...、同時に所有権とミュータビリティを変更する。 let mut mutable_box = immutable_box; println!("mutable_box contain... - https://man.plustar.jp/rust/example/scope/move/mut.html - [similar]
- 基本データ型 - Rust By Example 日本語版 8725
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...容に基づいて推定 inferred_type = 4294967296i64; // A mutable variable's value can be changed. // ミュータブルな...変数は値を変更できる let mut mutable = 12; // Mutable `i32` // ミュータブルな `i32`. mu...changed. // エラー! ミュータブルな変数でも型は不変 mutable = true; // Variables can be overwritten with shado...g. // 変数はシャドーイングによって上書きできる let mutable = true; } 参照 std ライブラリ , mut , inference ,... - https://man.plustar.jp/rust/example/primitives.html - [similar]
- ミュータビリティ - Rust By Example 日本語版 8725
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...k.year); } // This function takes a reference to a mutable book and changes `year` to 2014 // この関数はミュー...ok.title, book.year); } fn main() { // Create an immutable Book named `immutabook` // `immutabook`という名のイ..."Gödel, Escher, Bach", year: 1979, }; // Create a mutable copy of `immutabook` and call it `mutabook` // `im...ut mutabook = immutabook; // Immutably borrow an immutable object // イミュータブルなオブジェクトをイミュータ... - https://man.plustar.jp/rust/example/scope/borrow/mut.html - [similar]
- ミュータビリティ - Rust By Example 日本語版 8586
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...ることでミュータブルになります。 fn main() { let _immutable_binding = 1; let mut mutable_binding = 1; println!...("Before mutation: {}", mutable_binding); // Ok mutable_binding += 1; println!("Af...ter mutation: {}", mutable_binding); // Error! _immutable_binding += 1; // FI...t , エラー , binding , By , Example , Rust , let , mutable... - https://man.plustar.jp/rust/example/variable_bindings/mut.html - [similar]
- メソッド - Rust By Example 日本語版 7941
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...} // This method requires the caller object to be mutable // `&mut self` desugars to `self: &mut Self` // こ...oint::new(1.0, 1.0), }; // Error! `rectangle` is immutable, but this method requires a mutable // object // エ...DO ^ この行をアンコメントしてみましょう。 // Okay! Mutable objects can call mutable methods // OK! ミュータブ... - https://man.plustar.jp/rust/example/fn/methods.html - [similar]
- 定数 - Rust By Example 日本語版 7157
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...not have to be specified. Accessing or modifying a mutable static variable is unsafe . // Globals are declare... - https://man.plustar.jp/rust/example/custom_types/constants.html - [similar]