Trait StorageInterfaceOpen
pub trait StorageInterfaceOpen {
// Required methods
fn open_or_create(
location: &Path,
storage_instance: u64,
) -> Result<Self, StorageError>
where Self: Sized;
fn clone_to_new_instance(&self, storage_instance: u64) -> Self;
}
Available on crate feature
cara
only.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,
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.
fn clone_to_new_instance(&self, storage_instance: u64) -> Self
fn clone_to_new_instance(&self, storage_instance: u64) -> Self
Constructs a new instance from an existing one
For the case of storage_instance == 0
, an instance with the same value may already exist.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.