pub struct SqliteDovecote { /* private fields */ }Expand description
SQLite adapter for Dovecote’s durable event and delivery schema.
Implementations§
Source§impl SqliteDovecote
impl SqliteDovecote
Sourcepub fn new(pool: SqlitePool) -> Self
pub fn new(pool: SqlitePool) -> Self
Creates an adapter with the documented bounded busy policy.
Sourcepub const fn with_busy_config(pool: SqlitePool, busy: BusyConfig) -> Self
pub const fn with_busy_config(pool: SqlitePool, busy: BusyConfig) -> Self
Creates an adapter with an explicit busy retry policy.
Sourcepub const fn pool(&self) -> &SqlitePool
pub const fn pool(&self) -> &SqlitePool
Borrows the pool used by this adapter.
Sourcepub const fn busy_config(&self) -> BusyConfig
pub const fn busy_config(&self) -> BusyConfig
Returns the bounded busy policy used by adapter operations.
Sourcepub async fn begin_write(
&self,
) -> Result<Transaction<'static, Sqlite>, EnqueueError>
pub async fn begin_write( &self, ) -> Result<Transaction<'static, Sqlite>, EnqueueError>
Begins the caller transaction used for enqueue and application state.
It acquires SQLite’s single writer slot before any adapter reads.
§Errors
Returns an error for invalid busy configuration or if the SQLite writer
reservation cannot be acquired within the configured busy budget.
Sourcepub async fn begin_enqueue(
&self,
) -> Result<Transaction<'static, Sqlite>, EnqueueError>
pub async fn begin_enqueue( &self, ) -> Result<Transaction<'static, Sqlite>, EnqueueError>
Alias emphasizing that the returned transaction is suitable for
TenantDovecote::enqueue.
§Errors
Returns an error for invalid busy configuration or if the SQLite writer
reservation cannot be acquired within the configured busy budget.
Sourcepub fn for_tenant(&self, tenant_id: TenantId) -> TenantDovecote
pub fn for_tenant(&self, tenant_id: TenantId) -> TenantDovecote
Creates an ordinary handle restricted to one validated tenant.
Sourcepub fn admin(&self) -> AdminDovecote
pub fn admin(&self) -> AdminDovecote
Creates the explicit administrative handle for all-tenant reads and named writes.
Sourcepub async fn check_schema(&self) -> Result<(), SchemaError>
pub async fn check_schema(&self) -> Result<(), SchemaError>
Verifies that the pool’s current SQLite schema satisfies Dovecote.
§Errors
Returns an error for an unsupported backend, missing or incompatible migration markers, tables, constraints or indexes, or failed catalog reads.
Trait Implementations§
Source§impl Clone for SqliteDovecote
impl Clone for SqliteDovecote
Source§fn clone(&self) -> SqliteDovecote
fn clone(&self) -> SqliteDovecote
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SqliteDovecote
impl !UnwindSafe for SqliteDovecote
impl Freeze for SqliteDovecote
impl Send for SqliteDovecote
impl Sync for SqliteDovecote
impl Unpin for SqliteDovecote
impl UnsafeUnpin for SqliteDovecote
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
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> ⓘ
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> ⓘ
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