pub struct TenantConfig { /* private fields */ }Expand description
Configuration for TenantPlugin.
Implementations§
Source§impl TenantConfig
Fluent builder helpers for TenantConfig.
impl TenantConfig
Fluent builder helpers for TenantConfig.
Sourcepub fn with_base_domain<D>(self, base_domain: D) -> Self
pub fn with_base_domain<D>(self, base_domain: D) -> Self
Sourcepub fn with_path_prefix<P>(self, prefix: P) -> Self
pub fn with_path_prefix<P>(self, prefix: P) -> Self
Sourcepub fn with_require_known(self, require: bool) -> Self
pub fn with_require_known(self, require: bool) -> Self
Sourcepub fn with_tenant(self, record: TenantRecord) -> Self
pub fn with_tenant(self, record: TenantRecord) -> Self
Registers a static TenantRecord in the compiled directory.
§Arguments
TenantRecord- Tenant metadata entry.
§Returns
Self- Updated configuration.
Sourcepub fn with_exempt_prefixes<I, S>(self, prefixes: I) -> Self
pub fn with_exempt_prefixes<I, S>(self, prefixes: I) -> Self
Source§impl TenantConfig
impl TenantConfig
pub fn get_header_name(&self) -> &String
pub fn get_mut_header_name(&mut self) -> &mut String
pub fn set_header_name(&mut self, val: String) -> &mut Self
pub fn get_base_domain(&self) -> String
pub fn try_get_base_domain(&self) -> &Option<String>
pub fn get_mut_base_domain(&mut self) -> &mut Option<String>
pub fn set_base_domain(&mut self, val: Option<String>) -> &mut Self
pub fn get_path_prefix(&self) -> String
pub fn try_get_path_prefix(&self) -> &Option<String>
pub fn get_mut_path_prefix(&mut self) -> &mut Option<String>
pub fn set_path_prefix(&mut self, val: Option<String>) -> &mut Self
pub fn get_default_tenant(&self) -> String
pub fn try_get_default_tenant(&self) -> &Option<String>
pub fn get_mut_default_tenant(&mut self) -> &mut Option<String>
pub fn set_default_tenant(&mut self, val: Option<String>) -> &mut Self
pub fn get_require_known(&self) -> bool
pub fn get_mut_require_known(&mut self) -> &mut bool
pub fn set_require_known(&mut self, val: bool) -> &mut Self
pub fn get_tenants(&self) -> &Vec<TenantRecord>
pub fn get_mut_tenants(&mut self) -> &mut Vec<TenantRecord>
pub fn set_tenants(&mut self, val: Vec<TenantRecord>) -> &mut Self
pub fn get_exempt_prefixes(&self) -> &Vec<String>
pub fn get_mut_exempt_prefixes(&mut self) -> &mut Vec<String>
pub fn set_exempt_prefixes(&mut self, val: Vec<String>) -> &mut Self
Trait Implementations§
Source§impl Clone for TenantConfig
impl Clone for TenantConfig
Source§impl Debug for TenantConfig
impl Debug for TenantConfig
Source§impl Default for TenantConfig
Default construction for TenantConfig.
impl Default for TenantConfig
Default construction for TenantConfig.
Source§fn default() -> Self
fn default() -> Self
Constructs a TenantConfig inspecting x-tenant-id without requiring pre-registration.
§Returns
Self- Default configuration.
impl Eq for TenantConfig
Source§impl PartialEq for TenantConfig
impl PartialEq for TenantConfig
impl StructuralPartialEq for TenantConfig
Auto Trait Implementations§
impl Forget for TenantConfig
impl Freeze for TenantConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<TenantRecord>: Freeze,
PhantomData<String>: Freeze,
impl Move for TenantConfig
impl RefUnwindSafe for TenantConfig
impl Send for TenantConfigwhere
RawVecInner: Send,
impl Sync for TenantConfigwhere
RawVecInner: Sync,
impl Unpin for TenantConfig
impl UnsafeUnpin for TenantConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<TenantRecord>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for TenantConfigwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.