pub struct SqliteStorageFactory { /* private fields */ }Expand description
Shared Sqlite storage backend that can be used across multiple workers
Implementations§
Source§impl SqliteStorageFactory
impl SqliteStorageFactory
Sourcepub fn pool(&self) -> &SqlitePool
pub fn pool(&self) -> &SqlitePool
Get a reference to the underlying Sqlite connection pool
Source§impl SqliteStorageFactory
impl SqliteStorageFactory
Sourcepub fn new(url: &str) -> SqliteStorageFactory
pub fn new(url: &str) -> SqliteStorageFactory
Create a new shared Sqlite storage backend with the given database URL and codec
Sourcepub fn new_with_pool_options(
url: &str,
options: PoolOptions<Sqlite>,
) -> SqliteStorageFactory
pub fn new_with_pool_options( url: &str, options: PoolOptions<Sqlite>, ) -> SqliteStorageFactory
Create a new shared Sqlite storage backend with the given database URL and pool options
Trait Implementations§
Source§impl<Args> BackendFactory<Args> for SqliteStorageFactory
impl<Args> BackendFactory<Args> for SqliteStorageFactory
Source§type Backend = Interleave<SqliteStorage<Args>, SharedFetcher>
type Backend = Interleave<SqliteStorage<Args>, SharedFetcher>
The backend type produced by this factory.
Source§type Error = SharedSqliteError
type Error = SharedSqliteError
The error returned if backend creation fails.
Source§fn create(&mut self) -> Result<Self::Backend, Self::Error>
fn create(&mut self) -> Result<Self::Backend, Self::Error>
Create a backend using
Config::default().Source§fn create_with_config(
&mut self,
config: <Self::Backend as BackendConfig>::Config,
) -> Result<Self::Backend, Self::Error>
fn create_with_config( &mut self, config: <Self::Backend as BackendConfig>::Config, ) -> Result<Self::Backend, Self::Error>
Create a backend using the given configuration.
Source§impl Clone for SqliteStorageFactory
impl Clone for SqliteStorageFactory
Source§fn clone(&self) -> SqliteStorageFactory
fn clone(&self) -> SqliteStorageFactory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SqliteStorageFactory
impl !UnwindSafe for SqliteStorageFactory
impl Freeze for SqliteStorageFactory
impl Send for SqliteStorageFactory
impl Sync for SqliteStorageFactory
impl Unpin for SqliteStorageFactory
impl UnsafeUnpin for SqliteStorageFactory
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<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