pub trait StorageAccess {
type Storage;
const STORAGE_KEYS: &'static [&'static str];
}
Expand description
A trait for describing which storages an item needs access to. See StashDeviceStorageFactory::initialize for usage.
§Example
impl DeviceStorageCompatible for StorageItem {
// ...
const KEY: &'static str = "some_key";
}
impl StorageAccess for SomeItem {
type Storage = DeviceStorage;
const STORAGE_KEYS: &'static [&'static str] = &[StorageItem::KEY];
}
Required Associated Types§
Required Associated Constants§
sourceconst STORAGE_KEYS: &'static [&'static str]
const STORAGE_KEYS: &'static [&'static str]
This field should be populated by keys that are used by the corresponding storage mechanism.
Object Safety§
This trait is not object safe.