> Even a doubly-linked list is impossible to get through the borrow checker.
https://github.com/rust-lang/rust/blob/master/library/alloc/...
It's part of standard lib. And you don't get more idiomatic than that.
https://github.com/rust-lang/rust/blob/master/library/alloc/...
It's part of standard lib. And you don't get more idiomatic than that.
Depends what you mean by that. It has 2 pointer to other nodes and element on the heap (EDIT: Not stack). It's bog standard double linked list.
If you're looking for intrusive lists those a very niche data structure.
https://docs.rs/intrusive-collections/latest/intrusive_colle...
https://github.com/rust-lang/rust/blob/master/library/alloc/...