pub struct SqliteStoreConfig { /* private fields */ }Expand description
Validated connection configuration for SqliteAgentStore::connect_and_migrate.
Implementations§
Source§impl SqliteStoreConfig
impl SqliteStoreConfig
Sourcepub fn try_new(path: impl Into<PathBuf>) -> Result<Self, StoreError>
pub fn try_new(path: impl Into<PathBuf>) -> Result<Self, StoreError>
Creates a configuration targeting path with JournalMode::Wal.
Pass ":memory:" for an ephemeral in-memory database or a file path for durable
on-disk storage. Missing parent directories are created when
SqliteAgentStore::connect_and_migrate runs.
§Errors
Returns StoreError::Backend when path is empty.
Sourcepub fn with_journal_mode(self, mode: JournalMode) -> Self
pub fn with_journal_mode(self, mode: JournalMode) -> Self
Selects the SQLite JournalMode applied when opening the database connection.
Sourcepub const fn journal_mode(&self) -> JournalMode
pub const fn journal_mode(&self) -> JournalMode
Returns the configured SQLite JournalMode.
Trait Implementations§
Source§impl Clone for SqliteStoreConfig
impl Clone for SqliteStoreConfig
Source§impl Debug for SqliteStoreConfig
impl Debug for SqliteStoreConfig
impl Eq for SqliteStoreConfig
Source§impl PartialEq for SqliteStoreConfig
impl PartialEq for SqliteStoreConfig
impl StructuralPartialEq for SqliteStoreConfig
Auto Trait Implementations§
impl Forget for SqliteStoreConfig
impl Freeze for SqliteStoreConfig
impl Move for SqliteStoreConfig
impl RefUnwindSafe for SqliteStoreConfig
impl Send for SqliteStoreConfigwhere
RawVecInner: Send,
impl Sync for SqliteStoreConfigwhere
RawVecInner: Sync,
impl Unpin for SqliteStoreConfig
impl UnsafeUnpin for SqliteStoreConfig
impl UnwindSafe for SqliteStoreConfigwhere
RawVecInner: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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