検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 14 for borrowed (0.028 sec.)
構造体 - Rust By Example 日本語版 13041
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... けるライフタイムも関数のそれと似ている。 // A type `Borrowed` which houses a reference to an // `i32`. The refe ... rence to `i32` must outlive `Borrowed`. // `i32`への参照をメンバに持つ`Borrowed`型。 // ... 参照は`Borrowed`自体よりも長生きでなくてはならない。 #[derive(Debu ... g)] struct Borrowed<'a>(&'a i32); // Similarly, both references here m ...
https://man.plustar.jp/rust/example/scope/lifetime/struct.html - [similar]
エイリアス - Rust By Example 日本語版 12533
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... { let mut point = Point { x: 0, y: 0, z: 0 }; let borrowed_point = &point; let another_borrow = &point; // Da ... す。 println!("Point has coordinates: ({}, {}, {})", borrowed_point.x, another_borrow.y, point.z); // Error! Can ... orrow `point` as mutable because it's currently // borrowed as immutable. // エラー!pointはすでにイミュータブル ... point; // TODO ^ Try uncommenting this line // The borrowed values are used again here println!("Point has coo ...
https://man.plustar.jp/rust/example/scope/borrow/alias.html - [similar]
借用 - Rust By Example 日本語版 9627
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ws an i32 // この関数はi32を借用する fn borrow_i32(borrowed_i32: &i32) { println!("This int is: {}", borrowed_ ... Ownership is not taken, // so the contents can be borrowed again. // Boxの中身を借用。所有権を奪うわけではない ... Can't destroy `boxed_i32` while the inner value is borrowed later in scope. // エラー! // ボックス内の要素が借 ... / `_ref_to_i32` goes out of scope and is no longer borrowed. // ここで`_ref_to_i32`はスコープを抜け、借用もなく ...
https://man.plustar.jp/rust/example/scope/borrow.html - [similar]
Traits - Rust By Example 日本語版 8805
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... h annotation of lifetimes. #[derive(Debug)] struct Borrowed<'a> { x: &'a i32, } // Annotate lifetimes to impl. ... impl<'a> Default for Borrowed<'a> { fn default() -> Self { Self { x: &10, } } } ... fn main() { let b: Borrowed = Default::default(); println!("b is {:?}", b); } ...
https://man.plustar.jp/rust/example/scope/lifetime/trait.html - [similar]
スタティックライフタイム - Rust By Example 日本語版 8594
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... :15 | 15 | print_it(&i); | ---------^^-- | | | | | borrowed value does not live long enough | argument require ... s that `i` is borrowed for `'static` 16 | } | - `i` dropped here while st ... ill borrowed 参照 'static 定数 関連キーワード: static , ライフタ ...
https://man.plustar.jp/rust/example/scope/lifetime/static_lifetime.html - [similar]
ミュータビリティ - Rust By Example 日本語版 8069
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... n borrow_book(book: &Book) { println!("I immutably borrowed {} - {} edition", book.title, book.year); } // Thi ... &mut Book) { book.year = 2014; println!("I mutably borrowed {} - {} edition", book.title, book.year); } fn mai ...
https://man.plustar.jp/rust/example/scope/borrow/mut.html - [similar]
要素の捕捉 - Rust By Example 日本語版 7982
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... closure in the `print` variable. It will remain // borrowed until `print` is used the last time. // // `printl ... クロージャをコールする。 print(); // `color` can be borrowed immutably again, because the closure only holds // ... ラーを起こさず再借用することができる。 let _count_reborrowed = &mut count; // A non-copy type. // コピー不可能な ...
https://man.plustar.jp/rust/example/fn/closures/capture.html - [similar]
Rust By Example 日本語版 7982
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... :size_of_val(&xs)); // Arrays can be automatically borrowed as slices // 配列は自動的にスライスとして借用される ... an't take ownership of the tail, because `self` is borrowed; // instead take a reference to the tail // `self` ... closure in the `print` variable. It will remain // borrowed until `print` is used the last time. // // `printl ... クロージャをコールする。 print(); // `color` can be borrowed immutably again, because the closure only holds // ...
https://man.plustar.jp/rust/example/print.html - [similar]
明示的アノテーション - Rust By Example 日本語版 7982
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... はできない。 } fn main() { // Create variables to be borrowed below. // 下で借用するための変数を作成 let (four, ... る。 print_refs(&four, &nine); // Any input which is borrowed must outlive the borrower. // In other words, the ...
https://man.plustar.jp/rust/example/scope/lifetime/explicit.html - [similar]
テストケース: 連結リスト - Rust By Example 日本語版 7562
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... an't take ownership of the tail, because `self` is borrowed; // instead take a reference to the tail // `self` ...
https://man.plustar.jp/rust/example/custom_types/enum/testcase_linked_list.html - [similar]
PREV 1 2 NEXT