pub struct ActiveTenant {
pub column_name: &'static str,
pub value: SqlValue,
}Expand description
Active tenant value currently attached to a shared connection.
Tenant-scoped entities compare their tenant policy column with this value before compiling reads and writes. A column mismatch or missing tenant fails closed for tenant-scoped entities.
Fields§
§column_name: &'static strPhysical tenant column name expected by tenant-scoped entities.
value: SqlValueSQL value compared against the tenant column.
Implementations§
Source§impl ActiveTenant
impl ActiveTenant
Sourcepub fn from_context<T: TenantContext>(tenant: &T) -> Self
pub fn from_context<T: TenantContext>(tenant: &T) -> Self
Normalizes a user-defined tenant context into the runtime tenant value.
Trait Implementations§
Source§impl Clone for ActiveTenant
impl Clone for ActiveTenant
Source§fn clone(&self) -> ActiveTenant
fn clone(&self) -> ActiveTenant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ActiveTenant
impl Debug for ActiveTenant
Source§impl PartialEq for ActiveTenant
impl PartialEq for ActiveTenant
Source§fn eq(&self, other: &ActiveTenant) -> bool
fn eq(&self, other: &ActiveTenant) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ActiveTenant
Auto Trait Implementations§
impl Freeze for ActiveTenant
impl RefUnwindSafe for ActiveTenant
impl Send for ActiveTenant
impl Sync for ActiveTenant
impl Unpin for ActiveTenant
impl UnsafeUnpin for ActiveTenant
impl UnwindSafe for ActiveTenant
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