pub struct SharedSqliteStorage<Decode> { /* private fields */ }Expand description
Shared Sqlite storage backend that can be used across multiple workers
Implementations§
Sourcepub fn pool(&self) -> &SqlitePool
pub fn pool(&self) -> &SqlitePool
Get a reference to the underlying Sqlite connection pool
Sourcepub fn new(url: &str) -> Self
pub fn new(url: &str) -> Self
Create a new shared Sqlite storage backend with the given database URL
Sourcepub fn new_with_codec<Codec>(url: &str) -> SharedSqliteStorage<Codec>
pub fn new_with_codec<Codec>(url: &str) -> SharedSqliteStorage<Codec>
Create a new shared Sqlite storage backend with the given database URL and codec
Trait Implementations§
Source§fn clone(&self) -> SharedSqliteStorage<Decode>
fn clone(&self) -> SharedSqliteStorage<Decode>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§type Backend = SqliteStorage<Args, Decode, SharedFetcher<Vec<u8>>>
type Backend = SqliteStorage<Args, Decode, SharedFetcher<Vec<u8>>>
The backend type to be shared
Source§type MakeError = SharedSqliteError
type MakeError = SharedSqliteError
The error returned if the backend cant be shared
Returns the backend to be shared
Returns the backend with config
Auto Trait Implementations§
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