pub enum TenantFailureMode {
NotFound,
Forbidden,
Allow,
Custom(Box<dyn Fn() -> Response + Send + Sync>),
}Expand description
Controls framework behavior when no tenant is resolved for a request.
Variants§
NotFound
Return 404 Not Found when the tenant cannot be resolved.
Forbidden
Return 403 Forbidden when the tenant cannot be resolved.
Allow
Pass through — allow the request even without a resolved tenant.
Custom(Box<dyn Fn() -> Response + Send + Sync>)
Return a custom response when the tenant cannot be resolved.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TenantFailureMode
impl !RefUnwindSafe for TenantFailureMode
impl Send for TenantFailureMode
impl Sync for TenantFailureMode
impl Unpin for TenantFailureMode
impl UnsafeUnpin for TenantFailureMode
impl !UnwindSafe for TenantFailureMode
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