pub struct DatabaseNameIdentifier { /* private fields */ }Expand description
Database name-based tenant identification
Uses the database name as the tenant ID.
Implementations§
Source§impl DatabaseNameIdentifier
impl DatabaseNameIdentifier
Sourcepub fn strip_prefix(self, prefix: impl Into<String>) -> Self
pub fn strip_prefix(self, prefix: impl Into<String>) -> Self
Strip prefix from database name
Sourcepub fn strip_suffix(self, suffix: impl Into<String>) -> Self
pub fn strip_suffix(self, suffix: impl Into<String>) -> Self
Strip suffix from database name
Sourcepub fn case_sensitive(self) -> Self
pub fn case_sensitive(self) -> Self
Don’t lowercase the tenant ID
Trait Implementations§
Source§impl Clone for DatabaseNameIdentifier
impl Clone for DatabaseNameIdentifier
Source§fn clone(&self) -> DatabaseNameIdentifier
fn clone(&self) -> DatabaseNameIdentifier
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 moreSource§impl Debug for DatabaseNameIdentifier
impl Debug for DatabaseNameIdentifier
Source§impl Default for DatabaseNameIdentifier
impl Default for DatabaseNameIdentifier
Source§fn default() -> DatabaseNameIdentifier
fn default() -> DatabaseNameIdentifier
Returns the “default value” for a type. Read more
Source§impl TenantIdentifier for DatabaseNameIdentifier
impl TenantIdentifier for DatabaseNameIdentifier
Source§fn identify(&self, request: &RequestContext) -> Option<TenantId>
fn identify(&self, request: &RequestContext) -> Option<TenantId>
Identify tenant from request context
Source§fn strategy_name(&self) -> &'static str
fn strategy_name(&self) -> &'static str
Get the name of this identification strategy
Auto Trait Implementations§
impl Freeze for DatabaseNameIdentifier
impl RefUnwindSafe for DatabaseNameIdentifier
impl Send for DatabaseNameIdentifier
impl Sync for DatabaseNameIdentifier
impl Unpin for DatabaseNameIdentifier
impl UnsafeUnpin for DatabaseNameIdentifier
impl UnwindSafe for DatabaseNameIdentifier
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