safety: what I think is a safe macro for linked list creation

+ some docs changes and cleanup
This commit is contained in:
2025-07-20 01:36:48 +02:00
parent 0d8780017b
commit af5e5ff19e
5 changed files with 143 additions and 34 deletions

View File

@@ -1,9 +1,14 @@
A [`LinkedList`] implementation avoiding the use of [`Arc`]s in favor of unsafe manual removal of nodes when the caller knows all possible references are left unused.
A **linked list** implementation avoiding the use of [`Arc`]s in favor of unsafe manual removal of nodes when the caller knows all possible references are left unused.
The point of this crate is to offer [`Pin`] guarantees on the references into the list while allowing it to be modified. The implementation of all this doesn't require mutable access to the linked list itself so as a side effect it's possible to use the list in concurrent manners.
This means that it will try as smartly as possible to allow concurrent modifications to it as long as the nodes affected are unrelated.
# Types
There could be different types of linked list implementations in the future, like safer ones with [`Arc`], single-threaded ones, etc. But right now there's only:
* [`DoublyLinkedList`]: [`crate::double`] doubly linked list only in the heap with manual unsafe removal of items in it.
---
`cargo doc` is supported and is the main documentation of the library. But there's no official hosting of the document files.