Nonvolatile
Nonvolatile is a library for storing persistent settings and configuration data out of the way.
Nonvolatile state is created by instantiating a State
instance with a name, usually the name of the program creating it.
Any set values are written to disk either in ~/.local/.../[name]
or in %appdata%/.../[name]
, depending on the platform being used. Values persist until they are overwritten, and can be accessed by any program that loads the state with that name.
Most of the builtin types, and any type that implements serde::Serialize
/Deserialize
may be passed into and read from State::set
and State::get
.
Example
use State;
use *;