Expand description
§storage
Functionality for loading an persisting structures.
Modules§
- args
- Provides command line arguments that are typically used for all services using this module.
Functions§
- load_
struct - Loads and deserializes a structure described by T, if the file is present. If there are IO issues outside of the file not being there, they will be returned as an error. Beyond IO, state is attempted to be decrypted and deserialized when present. Any issues there cause the default representation of the structure to be returned. The default structure is also returned where there is no file present in the first place.
- save_
struct - Saves an encrypted structure described by T. Any IO errors are returned.