Trait bones_framework::storage::StorageApi
source · pub trait StorageApi: Sync + Send {
// Required methods
fn save(&mut self, data: Vec<SchemaBox>);
fn load(&mut self) -> Vec<SchemaBox>;
}
Expand description
Trait implemented by storage backends.
TODO: Implement asynchronous storage API. Currently all storage access is synchronous, which is not good for the user experience when a write to storage could delay the rendering of the next frame. We should come up with a nice-to-use API for asynchronously loading and storing data.