#back-end #storage

oml-storage

A very simple wrapper to handle locked storage of items

13 unstable releases (3 breaking)

0.4.0-alpha Jun 25, 2024
0.3.3-alpha Jun 25, 2024
0.2.1-alpha Jun 4, 2024
0.1.9-alpha May 30, 2024
0.1.4-alpha Jan 5, 2024

#881 in Database interfaces

Download history 32/week @ 2024-03-28 15/week @ 2024-04-04 2/week @ 2024-05-16 10/week @ 2024-05-23 221/week @ 2024-05-30 176/week @ 2024-06-06 158/week @ 2024-06-13 278/week @ 2024-06-20 56/week @ 2024-06-27 54/week @ 2024-07-04

416 downloads per month

MIT license

55KB
1K SLoC

oml-storage

A very simple wrapper to handle locked storage of items.

Warning

This crate is still very much in flux, and things might change a lot.

We do use it in production for one of our games, so it should be good enough.

Examples

For Examples check oml-storage-examples.

Breaking Changes

0.2.x -> 0.3.x

metadata_highest_seen_id return OptionITEM::ID

metadata_highest_seen_id returns an OptionITEM::ID now, which will be None if we haven't seen any Id yet.

0.1.x -> 0.2.x

Replaced &str ID with ITEM::ID

  • You will need to implement make_id and generate_next_id for you Items!
  • Consider extra careful testing when using anything but String for ITEM::ID

lib.rs:

A very simple wrapper to handle locked storage of items.

Provides an abstraction over storage backends. The core idea is that storage items will be locked in storage and stay hot in memory for a while.

Note: The documentation is still work-in-progress.

Dependencies

~36–49MB
~859K SLoC