pub struct SubdomainOrDomainStrategy { /* private fields */ }Expand description
Extracts tenant from subdomain (as slug) or falls back to the full domain (as custom domain).
Created by subdomain_or_domain(). Produces TenantId::Slug or TenantId::Domain.
- Single-level subdomain of base ->
TenantId::Slug - Unrelated host ->
TenantId::Domain(custom domain) - Base domain exactly -> 400 Bad Request
- Multi-level subdomain -> 400 Bad Request
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubdomainOrDomainStrategy
impl RefUnwindSafe for SubdomainOrDomainStrategy
impl Send for SubdomainOrDomainStrategy
impl Sync for SubdomainOrDomainStrategy
impl Unpin for SubdomainOrDomainStrategy
impl UnsafeUnpin for SubdomainOrDomainStrategy
impl UnwindSafe for SubdomainOrDomainStrategy
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