freelist-rs

Crates.iofreelist-rs
lib.rsfreelist-rs
version0.0.4
sourcesrc
created_at2024-09-22 18:47:14.15077
updated_at2024-10-03 15:17:19.770506
descriptionFree list for numeric values
homepage
repositoryhttps://github.com/piot/freelist-rs
max_upload_size
id1383200
size6,914
Peter Bjorklund (piot)

documentation

README

freelist-rs

A simple and efficient free list implementation in Rust, designed for managing the allocation and recycling of numeric IDs. Free numbers are recycled as late as possible to ensure minimal reuse over time, based on a Last In, First Out (LIFO) policy.

Features

  • LIFO-based recycling: Ensures that recently freed IDs are reused last
  • Customizable ID type: Supports any type that implements Copy, PartialEq, Debug, and From

Installation

Add the following to your Cargo.toml file:

[dependencies]
freelist-rs = "^0.0.3"

License

This library is licensed under the MIT License. See LICENSE for details.

Commit count: 3

cargo fmt