Registry / utility / intrusive-collections

intrusive-collections

JSON →
library0.10.2rscratesunverified

Intrusive collections for Rust including linked list and red-black tree.

# Cargo.toml [dependencies] intrusive-collections = "0.10.2"
INSTALL
IMPORT
SIG · INTRUSIVE-COLLECTI
I
intrusive-collections
utilityrustv0.10.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LinkedList
use intrusive_collections::LinkedList;

Create an intrusive linked list.

use intrusive_collections::LinkedList; use intrusive_collections::intrusive_adapter; struct MyNode { link: intrusive_collections::LinkedListLink, value: i32, } intrusive_adapter!(MyNodeAdapter = MyNode: MyNode { link: LinkedListLink }); fn main() { let mut list = LinkedList::new(MyNodeAdapter::new()); let node = Box::new(MyNode { link: LinkedListLink::new(), value: 42 }); list.push_back(node); }
Debug
Known issues
gotchaIntrusive collections require careful memory management; nodes must outlive the collection.
fix
Ensure nodes are not dropped while still in the collection.
affects: >=0.10.0
Upgrade
Version history
0.10.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
intrusive-collections — cargo add intrusive-collections · libregistry