検索

phrase: max: clip:
target: order:
Results of 1 - 6 of about 6 for size (0.017 sec.)
シングルスレッドサーバをマルチスレッド化する - Rust 日本語版 12448
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... tream; struct ThreadPool; impl ThreadPool { fn new(size: u32) -> ThreadPool { ThreadPool } fn execute<F>(& ... ub struct ThreadPool; impl ThreadPool { pub fn new(size: usize) -> ThreadPool { ThreadPool } } } size 引数 ... の型として、 usize を選択しました。何故なら、マイナスのスレッド数は、 ... 使用し、第3章の「整数型」節で議論したように、これは usize のあるべき姿であることも知っています。 コードを再度 ...
https://man.plustar.jp/rust/book/ch20-02-multithreaded.html - [similar]
一連の要素をイテレータで処理する - Rust 日本語版 10766
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... の値は含まれません。 リスト13-19では、環境から shoe_size 変数をキャプチャするクロージャで filter を使って、 ... main() { #[derive(PartialEq, Debug)] struct Shoe { size: u32, style: String, } fn shoes_in_my_size(shoes: ... Vec<Shoe>, shoe_size: u32) -> Vec<Shoe> { shoes.into_iter() .filter(|s| ... s.size == shoe_size) .collect() } #[test] fn filters_by_s ...
https://man.plustar.jp/rust/book/ch13-02-iterators.html - [similar]
正常なシャットダウンと片付け - Rust 日本語版 8298
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... fn main() { use std::thread; struct Worker { id: usize, thread: Option<thread::JoinHandle<()>>, } } さて、 ... : ファイル名: src/lib.rs impl Worker { fn new(id: usize, receiver: Arc<Mutex<mpsc::Receiver<Job>>>) -> Wor ... nwrap(); } } // --snip-- impl Worker { fn new(id: usize, receiver: Arc<Mutex<mpsc::Receiver<Message>>>) -> ... eadPool { /// Create a new ThreadPool. /// /// The size is the number of threads in the pool. /// /// # Pa ...
https://man.plustar.jp/rust/book/ch20-03-graceful-shutdown-and-cleanup.html - [similar]
メソッド記法 - Rust 日本語版 7878
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... th: u32, height: u32, } impl Rectangle { fn square(size: u32) -> Rectangle { Rectangle { width: size, heig ... ht: size } } } } この関連関数を呼び出すために、構造体名と一 ...
https://man.plustar.jp/rust/book/ch05-03-method-syntax.html - [similar]
高度な関数とクロージャ - Rust 日本語版 7750
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... `std::ops::Fn(i32) -> i32 + 'static: std::marker::Sized` is not satisfied --> | 1 | fn returns_closure() ... Fn(i32) -> i32 + 'static` does not have a constant size known at compile-time | = help: the trait `std::ma ... rker::Sized` is not implemented for `std::ops::Fn(i32) -> i32 ... rn type of a function must have a statically known size エラーは、再度 Sized トレイトを参照しています!コン ...
https://man.plustar.jp/rust/book/ch19-05-advanced-functions-and-closures.html - [similar]
ヒープのデータを指すBox<T>を使用する - Rust 日本語版 7640
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... 。 error[E0072]: recursive type `List` has infinite size (エラー: 再帰的な型`List`は無限のサイズです) --> s ... num List { | ^^^^^^^^^ recursive type has infinite size 2 | Cons(i32, List), | ----- recursive without ind ...
https://man.plustar.jp/rust/book/ch15-01-box.html - [similar]
PREV 1 NEXT