pub struct StoreOptions { /* private fields */ }Expand description
Defines how to create a Store.
Implementations§
Source§impl StoreOptions
impl StoreOptions
Sourcepub fn storage<N: Into<Namespace>>(self, namespace: N) -> Self
pub fn storage<N: Into<Namespace>>(self, namespace: N) -> Self
Persist entries under namespace in the active environment.
Sourcepub fn storage_with<N: Into<Namespace>>(
self,
storage: Box<dyn Storage>,
namespace: N,
) -> Self
pub fn storage_with<N: Into<Namespace>>( self, storage: Box<dyn Storage>, namespace: N, ) -> Self
Persist entries to an explicit storage addressing namespace,
bypassing the active environment. Mostly for tests and benches.
Sourcepub fn cache(self, cache: CacheOption) -> Self
pub fn cache(self, cache: CacheOption) -> Self
How the in-memory map is populated from the storage. Meaningless without one: an in-memory store keeps everything regardless.
Trait Implementations§
Source§impl Debug for StoreOptions
impl Debug for StoreOptions
Source§impl Default for StoreOptions
impl Default for StoreOptions
Source§fn default() -> StoreOptions
fn default() -> StoreOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StoreOptions
impl !Sync for StoreOptions
impl !UnwindSafe for StoreOptions
impl Freeze for StoreOptions
impl Send for StoreOptions
impl Unpin for StoreOptions
impl UnsafeUnpin for StoreOptions
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