pub struct SpinKeyValueStore { /* private fields */ }
Expand description
A key-value store that uses SQLite as the backend.
Implementations§
Source§impl SpinKeyValueStore
impl SpinKeyValueStore
Sourcepub fn new(base_path: Option<PathBuf>) -> Self
pub fn new(base_path: Option<PathBuf>) -> Self
Create a new SpinKeyValueStore with the given base path.
If the database directory is None, the database will always be in-memory.
If it’s Some
, the database will be stored at the combined base_path
and
the path
specified in the runtime configuration.
Trait Implementations§
Source§impl MakeKeyValueStore for SpinKeyValueStore
impl MakeKeyValueStore for SpinKeyValueStore
Source§const RUNTIME_CONFIG_TYPE: &'static str = "spin"
const RUNTIME_CONFIG_TYPE: &'static str = "spin"
Unique type identifier for the store.
Source§type RuntimeConfig = SpinKeyValueRuntimeConfig
type RuntimeConfig = SpinKeyValueRuntimeConfig
Runtime configuration for the store.
Source§type StoreManager = KeyValueSqlite
type StoreManager = KeyValueSqlite
The store manager for the store.
Source§fn make_store(
&self,
runtime_config: Self::RuntimeConfig,
) -> Result<Self::StoreManager>
fn make_store( &self, runtime_config: Self::RuntimeConfig, ) -> Result<Self::StoreManager>
Creates a new store manager from the runtime configuration.
Auto Trait Implementations§
impl Freeze for SpinKeyValueStore
impl RefUnwindSafe for SpinKeyValueStore
impl Send for SpinKeyValueStore
impl Sync for SpinKeyValueStore
impl Unpin for SpinKeyValueStore
impl UnwindSafe for SpinKeyValueStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more