pub struct LocalDataStore { /* private fields */ }Expand description
Local filesystem data store.
Implementations§
Source§impl LocalDataStore
impl LocalDataStore
Sourcepub fn new(base_path: impl Into<PathBuf>) -> Self
pub fn new(base_path: impl Into<PathBuf>) -> Self
Create a store rooted at base_path, creating the directory if
needed. Creation failure is deliberately ignored here — the
first put will surface it as a SomaError::DataStore.
Trait Implementations§
Source§impl DataStore for LocalDataStore
impl DataStore for LocalDataStore
Source§fn put(&self, key: &CacheKey, data: &Value) -> Result<DataRef>
fn put(&self, key: &CacheKey, data: &Value) -> Result<DataRef>
Store data and return a reference to it.
Source§fn config(&self) -> &StorageConfig
fn config(&self) -> &StorageConfig
Get the storage config.
Auto Trait Implementations§
impl Freeze for LocalDataStore
impl RefUnwindSafe for LocalDataStore
impl Send for LocalDataStore
impl Sync for LocalDataStore
impl Unpin for LocalDataStore
impl UnsafeUnpin for LocalDataStore
impl UnwindSafe for LocalDataStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more