pub struct TenantConfig {
pub id: TenantId,
pub name: String,
pub isolation: IsolationStrategy,
pub rate_limits: TenantRateLimits,
pub pool: TenantPoolConfig,
pub permissions: TenantPermissions,
pub ai_config: TenantAiConfig,
pub metadata: HashMap<String, String>,
pub enabled: bool,
pub created_at: SystemTime,
}Expand description
Full tenant configuration
Fields§
§id: TenantIdTenant identifier
name: StringDisplay name
isolation: IsolationStrategyIsolation strategy
rate_limits: TenantRateLimitsRate limits
pool: TenantPoolConfigConnection pool settings
permissions: TenantPermissionsPermissions and restrictions
ai_config: TenantAiConfigAI workload configuration
metadata: HashMap<String, String>Custom metadata
enabled: boolWhether tenant is enabled
created_at: SystemTimeTenant creation timestamp
Implementations§
Source§impl TenantConfig
impl TenantConfig
Sourcepub fn builder() -> TenantConfigBuilder
pub fn builder() -> TenantConfigBuilder
Create a new tenant config builder
Sourcepub fn new(id: impl Into<TenantId>, isolation: IsolationStrategy) -> Self
pub fn new(id: impl Into<TenantId>, isolation: IsolationStrategy) -> Self
Create with minimal configuration
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Check if tenant is in a healthy state
Sourcepub fn effective_max_connections(&self) -> u32
pub fn effective_max_connections(&self) -> u32
Get effective max connections considering pool config
Trait Implementations§
Source§impl Clone for TenantConfig
impl Clone for TenantConfig
Source§fn clone(&self) -> TenantConfig
fn clone(&self) -> TenantConfig
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 moreAuto Trait Implementations§
impl Freeze for TenantConfig
impl RefUnwindSafe for TenantConfig
impl Send for TenantConfig
impl Sync for TenantConfig
impl Unpin for TenantConfig
impl UnsafeUnpin for TenantConfig
impl UnwindSafe for TenantConfig
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