pub struct TenantPoolEntry {
pub tenant_id: TenantId,
pub stats: Arc<AtomicPoolStats>,
pub state: PoolState,
pub schema: Option<String>,
pub database: Option<String>,
}Expand description
Tenant-specific pool entry.
Fields§
§tenant_id: TenantIdTenant identifier.
stats: Arc<AtomicPoolStats>Pool statistics.
state: PoolStatePool state.
schema: Option<String>Schema name (for schema-based isolation).
database: Option<String>Database name (for database-based isolation).
Implementations§
Source§impl TenantPoolEntry
impl TenantPoolEntry
Sourcepub fn with_schema(self, schema: impl Into<String>) -> Self
pub fn with_schema(self, schema: impl Into<String>) -> Self
Set the schema.
Sourcepub fn with_database(self, database: impl Into<String>) -> Self
pub fn with_database(self, database: impl Into<String>) -> Self
Set the database.
Sourcepub fn mark_ready(&mut self)
pub fn mark_ready(&mut self)
Mark as ready.
Sourcepub fn should_evict(&self, idle_timeout: Duration) -> bool
pub fn should_evict(&self, idle_timeout: Duration) -> bool
Check if pool should be evicted (idle too long).
Auto Trait Implementations§
impl Freeze for TenantPoolEntry
impl !RefUnwindSafe for TenantPoolEntry
impl Send for TenantPoolEntry
impl Sync for TenantPoolEntry
impl Unpin for TenantPoolEntry
impl !UnwindSafe for TenantPoolEntry
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