33 breaking releases

0.39.0 Feb 14, 2024
0.37.0 Jan 24, 2024
0.35.2 Dec 21, 2023
0.34.1 Nov 29, 2023
0.7.2 Oct 28, 2022

#288 in Text processing

Download history 84/week @ 2023-11-04 152/week @ 2023-11-11 128/week @ 2023-11-18 216/week @ 2023-11-25 217/week @ 2023-12-02 189/week @ 2023-12-09 185/week @ 2023-12-16 196/week @ 2023-12-23 126/week @ 2023-12-30 151/week @ 2024-01-06 153/week @ 2024-01-13 154/week @ 2024-01-20 257/week @ 2024-01-27 75/week @ 2024-02-03 354/week @ 2024-02-10 923/week @ 2024-02-17

1,628 downloads per month
Used in 2 crates (via chamber-core)

Apache-2.0

10KB
197 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

~15–28MB
~438K SLoC