検索
Results of 31 - 40 of about 57 for mut (0.050 sec.)
- 定数 - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
c : スタティックな ライフタイムを持つミュータブル( mut )な値 The static lifetime is inferred and does not...
have to be specified. Accessing or modifying a mutable static variable is unsafe . // Globals are dec...
- https://man.plustar.jp/rust/example/custom_types/constants.html - [similar]
- エラーをBoxする - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
impl fmt::Display for EmptyVec { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "invali...
- https://man.plustar.jp/rust/example/error/multiple_error_types/boxing_errors.htm... - [similar]
- loopが返す値 - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
それが loop 式の値として返されます。 fn main() { let mut counter = 0; let result = loop { counter += 1; if...
- https://man.plustar.jp/rust/example/flow_control/loop/return.html - [similar]
- loop - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
移るときは continue が使用できます。 fn main() { let mut count = 0u32; println!("Let's count until infinity...
- https://man.plustar.jp/rust/example/flow_control/loop.html - [similar]
- while - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
{ // A counter variable // カウンタとなる変数 let mut n = 1; // Loop while `n` is less than 101 // `n`が...
- https://man.plustar.jp/rust/example/flow_control/while.html - [similar]
- Diverging functions - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
in() { fn sum_odd_numbers(up_to: u32) -> u32 { let mut acc = 0; for i in 0..up_to { // Notice that the re...
- https://man.plustar.jp/rust/example/fn/diverging.html - [similar]
- 高階関数 - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ミングによるアプローチ // 値を蓄積する変数を宣言 let mut acc = 0; // Iterate: 0, 1, 2, ... to infinity // 0...
- https://man.plustar.jp/rust/example/fn/hof.html - [similar]
- ミュータビリティ - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
所有権を移譲した際に変更できます。 fn main() { let immutable_box = Box::new(5u32); println!("immutable_box...
contains {}", immutable_box); // Mutability error // ミュータビリティエ...
ラー //*immutable_box = 4; // *Move* the box, changing the owner...
ship (and mutability) // boxを *ムーブ* する、同時に所有権とミュ...
- https://man.plustar.jp/rust/example/scope/move/mut.html - [similar]
- 他言語関数インターフェイス - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
} impl fmt::Debug for Complex { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if self.im < 0. {...
- https://man.plustar.jp/rust/example/std_misc/ffi.html - [similar]
- create - Rust By Example 日本語版 6579
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
込み専用モードで開く。返り値は`io::Result<File>` let mut file = match File::create(&path) { Err(why) => pan...
- https://man.plustar.jp/rust/example/std_misc/file/create.html - [similar]