43 breaking releases

0.49.0 Nov 12, 2024
0.47.0 Jul 23, 2024
0.42.0 Mar 18, 2024
0.35.2 Dec 21, 2023
0.7.2 Oct 28, 2022

#920 in Encoding

Download history 3/week @ 2024-08-16 10/week @ 2024-08-23 25/week @ 2024-08-30 44/week @ 2024-09-06 52/week @ 2024-09-13 52/week @ 2024-09-20 311/week @ 2024-09-27 64/week @ 2024-10-04 25/week @ 2024-10-11 6/week @ 2024-10-18 2/week @ 2024-10-25 2/week @ 2024-11-01 109/week @ 2024-11-08 25/week @ 2024-11-15 23/week @ 2024-11-22 19/week @ 2024-11-29

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

Apache-2.0

29KB
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

~6–12MB
~155K SLoC