45 breaking releases

new 0.51.0 Jan 10, 2025
0.49.0 Nov 12, 2024
0.47.0 Jul 23, 2024
0.42.0 Mar 18, 2024
0.7.2 Oct 28, 2022

#859 in Encoding

Download history 65/week @ 2024-09-23 340/week @ 2024-09-30 27/week @ 2024-10-07 18/week @ 2024-10-14 2/week @ 2024-10-21 4/week @ 2024-10-28 123/week @ 2024-11-11 20/week @ 2024-11-18 20/week @ 2024-11-25 39/week @ 2024-12-02 197/week @ 2024-12-09 17/week @ 2024-12-16 226/week @ 2025-01-06

252 downloads per month
Used in 2 crates (via chamber-core)

Apache-2.0

30KB
545 lines

Shuttle Persist

This plugin allows persisting struct that implement serde::Serialize and loading them again using serde::Deserialize.

Usage

Add shuttle-persist to the dependencies for your service. You can get this resource using the shuttle-persist::Persist attribute to get a PersistInstance. Objects can now be managed with the following six methods:

  • clear(): removes the keys within the PersistInstance
  • list(): returns a vector of strings containing all the keys associated with a PersistInstance
  • load(): loads the contents of the PersistInstance
  • new(): constructs a new PersistInstance along with its associated storage folder
  • save(): saves a key-value pair into the PersistInstance
  • remove(): deletes a key from the PersistInstance

An example using the Rocket framework can be found on GitHub

Dependencies

~7–13MB
~151K SLoC