|
|
@ -145,18 +145,18 @@ impl Store { |
|
|
|
/// `primary_path` must be the path of the primary instance and `secondary_path` an other directory for the secondary instance cache.
|
|
|
|
/// `primary_path` must be the path of the primary instance and `secondary_path` an other directory for the secondary instance cache.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// If you want to simple read-only [`Store`] use [`Store::open_read_only`].
|
|
|
|
/// If you want to simple read-only [`Store`] use [`Store::open_read_only`].
|
|
|
|
#[cfg(all(not(target_family = "wasm")))] |
|
|
|
// #[cfg(all(not(target_family = "wasm")))]
|
|
|
|
pub fn open_persistent_secondary( |
|
|
|
// pub fn open_persistent_secondary(
|
|
|
|
primary_path: impl AsRef<Path>, |
|
|
|
// primary_path: impl AsRef<Path>,
|
|
|
|
secondary_path: impl AsRef<Path>, |
|
|
|
// secondary_path: impl AsRef<Path>,
|
|
|
|
) -> Result<Self, StorageError> { |
|
|
|
// ) -> Result<Self, StorageError> {
|
|
|
|
Ok(Self { |
|
|
|
// Ok(Self {
|
|
|
|
storage: Storage::open_persistent_secondary( |
|
|
|
// storage: Storage::open_persistent_secondary(
|
|
|
|
primary_path.as_ref(), |
|
|
|
// primary_path.as_ref(),
|
|
|
|
secondary_path.as_ref(), |
|
|
|
// secondary_path.as_ref(),
|
|
|
|
)?, |
|
|
|
// )?,
|
|
|
|
}) |
|
|
|
// })
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
/// Opens a read-only [`Store`] from disk.
|
|
|
|
/// Opens a read-only [`Store`] from disk.
|
|
|
|
///
|
|
|
|
///
|
|
|
|