pub struct TenantManagerBuilder { /* private fields */ }Expand description
Builder for TenantManager
Implementations§
Source§impl TenantManagerBuilder
impl TenantManagerBuilder
Sourcepub fn config(self, config: MultiTenancyConfig) -> Self
pub fn config(self, config: MultiTenancyConfig) -> Self
Set configuration
Sourcepub fn identifier(self, identifier: Arc<dyn TenantIdentifier>) -> Self
pub fn identifier(self, identifier: Arc<dyn TenantIdentifier>) -> Self
Set custom identifier
Sourcepub fn header_identification(self, header: impl Into<String>) -> Self
pub fn header_identification(self, header: impl Into<String>) -> Self
Use header identification
Sourcepub fn username_prefix_identification(self, separator: char) -> Self
pub fn username_prefix_identification(self, separator: char) -> Self
Use username prefix identification
Sourcepub fn query_transformer(self, transformer: TenantQueryTransformer) -> Self
pub fn query_transformer(self, transformer: TenantQueryTransformer) -> Self
Set custom query transformer
Sourcepub fn provisioner(self, provisioner: TenantProvisioner) -> Self
pub fn provisioner(self, provisioner: TenantProvisioner) -> Self
Set custom provisioner
Sourcepub fn allow_unknown_tenants(self) -> Self
pub fn allow_unknown_tenants(self) -> Self
Allow unknown tenants
Sourcepub fn auto_create_tenants(self) -> Self
pub fn auto_create_tenants(self) -> Self
Auto-create tenants
Sourcepub fn default_tenant_config(self, config: TenantConfig) -> Self
pub fn default_tenant_config(self, config: TenantConfig) -> Self
Set default tenant config
Sourcepub fn build(self) -> TenantManager
pub fn build(self) -> TenantManager
Build the TenantManager
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TenantManagerBuilder
impl !RefUnwindSafe for TenantManagerBuilder
impl Send for TenantManagerBuilder
impl Sync for TenantManagerBuilder
impl Unpin for TenantManagerBuilder
impl UnsafeUnpin for TenantManagerBuilder
impl !UnwindSafe for TenantManagerBuilder
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> 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