Module storage
Expand description
Interface and methods to store and load simulation aspects.
§Overview
In general, the storage solutions used can be configured with the StorageBuilder struct. Head there to view a list of all supported options.
use cellular_raza_core::storage::*;
let builder = StorageBuilder::new()
.priority([StorageOption::SerdeJson])
.location("/tmp")
.add_date(true)
.suffix("my_awesome_sim");
Afterwards, we can provide this builder to our chosen backend which will take the information contained in it and then construct a StorageManager to actually handle loading and storing.
§Storage Solutions
We provide multiple storage options to choose from.
§Json
Relies on the serde_json crate to serialize
elements and store them as plain .json
files.
See JsonStorageInterface.
§Sled
Builds an embedded database at the specified location. This database is a key-value storage and can be accessed via the sled crate. See SledStorageInterface
§Sled (Temp)
Identical to the previous item but will remove the database after it has dropped. This options is mostly required when performing analysis steps afterwards without saving the full simulation results. See SledStorageInterface
Structs§
- Batch
Save Format - Define how batches of elements and identifiers are saved when being serialized.
- Combined
Save Format - Define how elements and identifiers are saved when being serialized together.
- Json
Storage Interface - Save elements as json files with serde_json.
- Memory
Storage Interface - Use the [sled] database to save results to an embedded database.
- RonStorage
Interface - Save elements as ron files with ron.
- Sled
Storage Interface - Use the [sled] database to save results to an embedded database.
- Storage
Builder - Used to construct a StorageManager
- Storage
Manager - This manager handles if multiple storage options have been specified It can load resources from one storage aspect and will
Enums§
- Storage
Error - Error related to storing and reading elements
- Storage
Mode - The mode in which to generate paths and store results.
- Storage
Option - Define how to store results of the simulation.
Traits§
- File
Based Storage - Abstraction and simplification of many file-based storage solutions
- Storage
Interface - Provide methods to initialize, store and load single and multiple elements at iterations.
- Storage
Interface Load - Handles loading of elements
- Storage
Interface Open - Open or create a new instance of the Storage controller.
- Storage
Interface Store - Handles storing of elements