検索

phrase: max: clip:
target: order:
Results of 1 - 8 of about 8 for slice (0.020 sec.)
配列とスライス - Rust By Example 日本語版 12905
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 持ちます。 use std::mem; // This function borrows a slice // この関数はスライスを借用する fn analyze_slice(s ... lice: &[i32]) { println!("first element of the slice: {}", slice[0]); println!("the slice has {} elemen ... ts", slice.len()); } fn main() { // Fixed-size array (type si ... (&xs)); // Arrays can be automatically borrowed as slices // 配列は自動的にスライスとして借用される。 print ...
https://man.plustar.jp/rust/example/primitives/array.html - [similar]
安全でない操作 - Rust By Example 日本語版 11115
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ead of the compiler's. One example of this is std::slice::from_raw_parts which will create a slice given a ... ointer to the first element and a length. use std::slice; fn main() { let some_vector = vec![1, 2, 3, 4]; l ... ); let length = some_vector.len(); unsafe { let my_slice: &[u32] = slice::from_raw_parts(pointer, length); ... assert_eq!(some_vector.as_slice(), my_slice); } } For slice::from_raw_parts , one ...
https://man.plustar.jp/rust/example/unsafe.html - [similar]
Rust By Example 日本語版 8910
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 持ちます。 use std::mem; // This function borrows a slice // この関数はスライスを借用する fn analyze_slice(s ... lice: &[i32]) { println!("first element of the slice: {}", slice[0]); println!("the slice has {} elemen ... ts", slice.len()); } fn main() { // Fixed-size array (type si ... (&xs)); // Arrays can be automatically borrowed as slices // 配列は自動的にスライスとして借用される。 print ...
https://man.plustar.jp/rust/example/print.html - [similar]
Path - Rust By Example 日本語版 7934
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ("a").join("b"); // Convert the path into a string slice // パスを文字列のスライスに変換する。 match new_pa ...
https://man.plustar.jp/rust/example/std_misc/path.html - [similar]
列挙型 - Rust By Example 日本語版 7844
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... o_owned()` creates an owned `String` from a string slice. // `to_owned()`は文字列スライスから所有権のある`S ...
https://man.plustar.jp/rust/example/custom_types/enum.html - [similar]
ドキュメンテーション - Rust By Example 日本語版 7844
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... す。 /// /// # Arguments /// /// * `name` - A string slice that holds the name of the person /// * `name` - ` ...
https://man.plustar.jp/rust/example/meta/doc.html - [similar]
文字列 - Rust By Example 日本語版 7844
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... tring.push_str(", "); } // The trimmed string is a slice to the original string, hence no new // allocation ...
https://man.plustar.jp/rust/example/std/str.html - [similar]
イテレータ - Rust By Example 日本語版 7844
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... `iter` method produces an `Iterator` over an array/slice. // `iter`メソッドは配列やスライスからイテレータを ...
https://man.plustar.jp/rust/example/trait/iter.html - [similar]
PREV 1 NEXT