検索

phrase: max: clip:
target: order:
Results of 1 - 8 of about 8 for mem (0.019 sec.)
リテラル - Rust By Example 日本語版 12236
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... トで返す。 println!("size of `x` in bytes: {}", std::mem::size_of_val(&x)); println!("size of `y` in bytes: ... {}", std::mem::size_of_val(&y)); println!("size of `z` in bytes: ... {}", std::mem::size_of_val(&z)); println!("size of `i` in bytes: ... {}", std::mem::size_of_val(&i)); println!("size of `f` in bytes: ...
https://man.plustar.jp/rust/example/types/literals.html - [similar]
Box, スタックとヒープ - Rust By Example 日本語版 11278
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... により一段と直接的な操作が可能になります。 use std::mem; #[allow(dead_code)] #[derive(Debug, Clone, Copy)] ... ; println!("Point occupies {} bytes on the stack", mem::size_of_val(&point)); println!("Rectangle occupie ... s {} bytes on the stack", mem::size_of_val(&rectangle)); // box size == pointer ... tln!("Boxed point occupies {} bytes on the stack", mem::size_of_val(&boxed_point)); println!("Boxed recta ...
https://man.plustar.jp/rust/example/std/box.html - [similar]
Rust By Example 日本語版 9489
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... -> (bool, i32) { // `let` can be used to bind the members of a tuple to variables // `let`でタプルの中の ... value: {}", long_tuple.1); // Tuples can be tuple members // タプルはタプルのメンバになれる let tuple_of ... され、 &[T] という型シグネチャを持ちます。 use std::mem; // This function borrows a slice // この関数はスラ ... ック上に置かれる println!("array occupies {} bytes", mem::size_of_val(&xs)); // Arrays can be automatically ...
https://man.plustar.jp/rust/example/print.html - [similar]
要素の捕捉 - Rust By Example 日本語版 8946
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... つは必要なときのみ取得します。 fn main() { use std::mem; let color = String::from("green"); // A closure t ... // コピー不可能な型 let movable = Box::new(3); // `mem::drop` requires `T` so this must take by value. A ... ovable` immediately moves into // the closure. // `mem::drop`は`T`(ジェネリック型)を取る必要があるため、 ... nsume = || { println!("`movable`: {:?}", movable); mem::drop(movable); }; // `consume` consumes the varia ...
https://man.plustar.jp/rust/example/fn/closures/capture.html - [similar]
捕捉時の型推論 - Rust By Example 日本語版 8675
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 2` F: Fn(i32) -> i32 { f(3) } fn main() { use std::mem; let greeting = "hello"; // A non-copy type. // `t ... / be captured by value. Now requires `FnOnce`. // `mem::drop`を明示的に呼ぶと`farewell`が値で // 捕捉され ... る必要性が発生する。よって`FnOnce`が必要になる。 mem::drop(farewell); }; // Call the function which app ... ("3 doubled: {}", apply_to_3(double)); } 参照 std::mem::drop , Fn , FnMut , Generics , where and FnOnce 関 ...
https://man.plustar.jp/rust/example/fn/closures/input_parameters.html - [similar]
配列とスライス - Rust By Example 日本語版 7428
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... され、 &[T] という型シグネチャを持ちます。 use std::mem; // This function borrows a slice // この関数はスラ ... ック上に置かれる println!("array occupies {} bytes", mem::size_of_val(&xs)); // Arrays can be automatically ...
https://man.plustar.jp/rust/example/primitives/array.html - [similar]
クローン - Rust By Example 日本語版 7428
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... pair.clone(); // Drop the original pair using std::mem::drop // std::mem::dropを用いて元のpairをドロップす ...
https://man.plustar.jp/rust/example/trait/clone.html - [similar]
ドキュメンテーション - Rust By Example 日本語版 6741
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... m libcore/prelude #[doc(no_inline)] pub use crate::mem::drop; hidden Using this tells rustdoc not to incl ...
https://man.plustar.jp/rust/example/meta/doc.html - [similar]
PREV 1 NEXT