LoginSignup
3
3

More than 5 years have passed since last update.

Learn Rust by writing Entirely Too Many linked lists

Last updated at Posted at 2015-07-27

Learn Rust by writing Entirely Too Many linked lists
http://cglab.ca/~abeinges/blah/too-many-lists/book/
https://github.com/Gankro/too-many-lists

I fairly frequently get asked how to implement a linked list in Rust. The answer honestly depends on what your requirements are, and it's obviously not super easy to answer the question on the spot. As such I've decided to write this book to comprehensively answer the question once and for all.

In this series I will teach you basic and advanced Rust programming entirely by having you implement 6 linked lists. In doing so, you should learn:

  • The following pointer types: &, &mut, Box, Rc, Arc, *const, *mut
  • Ownership, borrowing, inherited mutability, interior mutability, Copy
  • All The Keywords: struct, enum, fn, pub, impl, use, ...
  • Pattern matching, generics, destructors
  • Testing
  • Basic Unsafe Rust

Yes, linked lists are so truly awful that you deal with all of these concepts in making them real.

(参考訳)

Rustでリンクリストをどう実装するかという質問をたびたび受けます。正直なところ、回答内容はどのような要件かに依存し、その場で質問に答えるのは簡単なことではないのです。なので、こういった質問にまとめて答える本書を書こうと決めました。

このシリーズでは、6種類のリンクリスト実装を通じてRustプログラミングの基礎と応用を教えます。そこでは、下記を学べます:

  • 次のポインタ型:&, &mut, Box, Rc, Arc, *const, *mut
  • 所有権(ownership)、借用(borrowing)、mutable性の継承(inherited mutability)、内的なmutable性(interior mutability)、コピー(copy)
  • 全てのキーワード:struct, enum, fn, pub, impl, use, ...
  • テスト
  • UnsafeなRustの基礎

ええ、これら全てのコンセプトを扱うのに、リンクスリストの実装というのはハッキリ言うとひどい題材ではあります。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3