公式
https://www.rust-lang.org/
https://blog.rust-lang.org/
https://github.com/rust-lang/rust
Web上の実行環境
https://play.rust-lang.org
日本語の情報
https://rust-jp.rs/
※Rustを学びたい人はまず最初に公式のThe Bookを読むこと
https://doc.rust-lang.org/book/
※Rustを学ぶ際に犯しがちな12の過ち
https://dystroy.org/blog/how-not-to-learn-rust
※Rustのasyncについて知りたければ「async-book」は必読
https://rust-lang.github.io/async-book/
※C++との比較は専用スレへ
C++ vs Rust
https://mevius.5ch.net/test/read.cgi/tech/1619219089/
※次スレは原則>>980が立てること
前スレ
Rust part13
https://mevius.5ch.net/test/read.cgi/tech/1636247099/
探検
Rust part14
■ このスレッドは過去ログ倉庫に格納されています
2022/02/12(土) 01:24:16.59ID:XYE+Rws6
2022/02/12(土) 01:27:40.45ID:aHobc4uM
Rust The Book (日本語版)
https://doc.rust-jp.rs/book-ja/
Rust edition guide (日本語版)
https://doc.rust-jp.rs/edition-guide/
Rust by example (日本語版)
https://doc.rust-jp.rs/rust-by-example-ja/
Rust cookbook (日本語版)
https://uma0317.github.io/rust-cookbook-ja/
Rust API guideline (日本語版)
https://sinkuu.github.io/api-guidelines/
Rust nomicon book (日本語版)
https://doc.rust-jp.rs/rust-nomicon-ja/
Rust WASM book (日本語版)
https://moshg.github.io/rustwasm-book-ja/
Rust embeded book (日本語版)
https://tomoyuki-nakabayashi.github.io/book/
Rust enbeded discovery (日本語版)
https://tomoyuki-nakabayashi.github.io/discovery/
https://doc.rust-jp.rs/book-ja/
Rust edition guide (日本語版)
https://doc.rust-jp.rs/edition-guide/
Rust by example (日本語版)
https://doc.rust-jp.rs/rust-by-example-ja/
Rust cookbook (日本語版)
https://uma0317.github.io/rust-cookbook-ja/
Rust API guideline (日本語版)
https://sinkuu.github.io/api-guidelines/
Rust nomicon book (日本語版)
https://doc.rust-jp.rs/rust-nomicon-ja/
Rust WASM book (日本語版)
https://moshg.github.io/rustwasm-book-ja/
Rust embeded book (日本語版)
https://tomoyuki-nakabayashi.github.io/book/
Rust enbeded discovery (日本語版)
https://tomoyuki-nakabayashi.github.io/discovery/
2022/02/12(土) 01:28:24.19ID:aHobc4uM
Rust CLI (Command Line Interface) apps Book
https://rust-cli.github.io/book/
Rust async-std Book
https://book.async.rs/
Rust The Unstable Book
https://doc.rust-lang.org/nightly/unstable-book/
Rust rustc Book
https://doc.rust-lang.org/rustc/
Rust Cargo Book
https://doc.rust-lang.org/cargo/
The Rust Reference
https://doc.rust-lang.org/reference/
The Rust Standard Library
https://doc.rust-lang.org/std/
https://rust-cli.github.io/book/
Rust async-std Book
https://book.async.rs/
Rust The Unstable Book
https://doc.rust-lang.org/nightly/unstable-book/
Rust rustc Book
https://doc.rust-lang.org/rustc/
Rust Cargo Book
https://doc.rust-lang.org/cargo/
The Rust Reference
https://doc.rust-lang.org/reference/
The Rust Standard Library
https://doc.rust-lang.org/std/
2022/02/12(土) 13:48:10.54ID:kNBFVDwU
新スレ乙です
前スレ994流れてたので
(以下引用)
struct S;
impl Drop for S {
fn drop(&mut self) {
println!("drop");
}
}
fn main() {
S;
}
↑じゃあこれは何が所有権をもってて何がdropさせてんの?
インスタンス説のほうがまだシックリくる?
変数も所有権を持てるしスコープ終了で手放せる?
(以上引用)
この場合はmain内の
S;
のところに隠れた一時変数がいて
{ let _s = S; }
みたいに変換されると考えれば自然だと思う
前スレ994流れてたので
(以下引用)
struct S;
impl Drop for S {
fn drop(&mut self) {
println!("drop");
}
}
fn main() {
S;
}
↑じゃあこれは何が所有権をもってて何がdropさせてんの?
インスタンス説のほうがまだシックリくる?
変数も所有権を持てるしスコープ終了で手放せる?
(以上引用)
この場合はmain内の
S;
のところに隠れた一時変数がいて
{ let _s = S; }
みたいに変換されると考えれば自然だと思う
2022/02/12(土) 13:53:07.63ID:qPU2UgbF
前スレ>>994
匿名の一時変数(temporary)が所有者になってenclosing scopeを抜ける時にdropが呼ばれる
公式の見解とは違うけど変数じゃなくスコープが所有者になるという捉え方のほうが分かりやすければ別にそれでもいいと思う
実装的にはその方が近い
匿名の一時変数(temporary)が所有者になってenclosing scopeを抜ける時にdropが呼ばれる
公式の見解とは違うけど変数じゃなくスコープが所有者になるという捉え方のほうが分かりやすければ別にそれでもいいと思う
実装的にはその方が近い
2022/02/12(土) 13:54:01.32ID:qPU2UgbF
すまん、モロ被りした
7デフォルトの名無しさん
2022/02/12(土) 16:30:44.26ID:v8ccrYYP >>4 >>5
それで正解。
所有権については公式がこう↓うたってんだから、値だとかインスタンスだとかいってる奴は公式に文句言えと。
4.1. What is ownership?
(ttps://doc.rust-lang.org/book/ch04-01-what-is-ownership.html)
Ownership Rules
First, let’s take a look at the ownership rules.
Keep these rules in mind as we work through the examples that illustrate them:
* Each value in Rust has a variable that’s called its owner.
* There can only be one owner at a time.
* When the owner goes out of scope, the value will be dropped.
それで正解。
所有権については公式がこう↓うたってんだから、値だとかインスタンスだとかいってる奴は公式に文句言えと。
4.1. What is ownership?
(ttps://doc.rust-lang.org/book/ch04-01-what-is-ownership.html)
Ownership Rules
First, let’s take a look at the ownership rules.
Keep these rules in mind as we work through the examples that illustrate them:
* Each value in Rust has a variable that’s called its owner.
* There can only be one owner at a time.
* When the owner goes out of scope, the value will be dropped.
8デフォルトの名無しさん
2022/02/12(土) 16:59:30.70ID:v8ccrYYP 非同期のデファクトライブラリはtokioかと思うがasync-std使ってる人おる?
2022/02/12(土) 17:24:19.71ID:LO6bM52V
sqlxがasync-stdのサポート切るって聞いたけどほんと?
■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 【東京】赤坂サウナ火事2人死亡 サウナ室のドアノブ外れ閉じ込められた可能性 ★5 [nita★]
- 「こども2万円給付」は“ずるい”?「子持ちだけ優遇されてる」「来年から独身税もあるのに」…子育て世帯への支援は“不公平”なのか [♪♪♪★]
- 「こども2万円給付」は“ずるい”?「子持ちだけ優遇されてる」「来年から独身税もあるのに」…子育て世帯への支援は“不公平”なのか★2 [♪♪♪★]
- 「PC買うなら急げ」は本当だった。マウスが一部販売停止&1月値上げを発表 [♪♪♪★]
- 【速報】 ロシア潜水艦が攻撃されて巨大水柱 [お断り★]
- 渡邊渚、批判・騒動への本音「ネット上では声が大きい人の意見が「普通」と思わされてしまう。これが今の日本社会の現状なんだな」 [muffin★]
- AIのせいで、PCもスマホもゲーム機も高騰して買えない。そこまでしてAIって必要か? [201193242]
- 【高市速報】ヤフコメアンケート「上野動物園にパンダは必要?」パンダはいらないが脅威の90%😳 [931948549]
- 東京都「お願いパンダレンタルさせて!!!😭」中国「🥴」 [817260143]
- 解説者「高市、物価高対策何もしてなくね?」志らく「…俺はいいよ?でもネットの高市応援団が黙ってないで😡」 [359965264]
- 【高市ラジカセ】 カセットテープでお馴染みのマクセル。 従来製品比で4倍の容量を持つ「全固体電池」を発表 🎉 [485983549]
- 3時のおやつ🧁はふなキャンディー🍬🏡
