Trait StorageInterfaceOpen

pub trait StorageInterfaceOpen {
    // Required method
    fn open_or_create(
        location: &Path,
        storage_instance: u64,
    ) -> Result<Self, StorageError>
       where Self: Sized;
}
Expand description

Open or create a new instance of the Storage controller.

Required Methods§

fn open_or_create( location: &Path, storage_instance: u64, ) -> Result<Self, StorageError>
where Self: Sized,

Initializes the current storage device.

In the case of databases, this may already result in an IO operation while when saving as files such as json folders might be created.

Implementors§

§

impl<Id, Element> StorageInterfaceOpen for JsonStorageInterface<Id, Element>

§

impl<Id, Element> StorageInterfaceOpen for MemoryStorageInterface<Id, Element>

§

impl<Id, Element> StorageInterfaceOpen for RonStorageInterface<Id, Element>

§

impl<Id, Element, const TEMP: bool> StorageInterfaceOpen for SledStorageInterface<Id, Element, TEMP>