pub enum PoolStrategy {
Shared {
max_connections: usize,
},
PerTenant {
max_pools: usize,
pool_size: usize,
},
PerDatabase {
max_databases: usize,
pool_size: usize,
},
}Expand description
Strategy for managing tenant connections.
Variants§
Single shared pool with tenant context injection (row-level isolation). Most memory efficient, lowest latency for first request.
PerTenant
Per-tenant connection pools (schema-based isolation). Medium memory usage, consistent latency per tenant.
Fields
PerDatabase
Per-tenant databases with dedicated pools (complete isolation). Highest memory usage, best isolation.
Trait Implementations§
Source§impl Clone for PoolStrategy
impl Clone for PoolStrategy
Source§fn clone(&self) -> PoolStrategy
fn clone(&self) -> PoolStrategy
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§impl Debug for PoolStrategy
impl Debug for PoolStrategy
Auto Trait Implementations§
impl Freeze for PoolStrategy
impl RefUnwindSafe for PoolStrategy
impl Send for PoolStrategy
impl Sync for PoolStrategy
impl Unpin for PoolStrategy
impl UnwindSafe for PoolStrategy
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