pub struct TenantContext {
pub tenant_id: String,
}Expand description
Tenant context for all operations
This ensures that every operation is explicitly scoped to a tenant, preventing accidental cross-tenant operations.
Fields§
§tenant_id: StringThe tenant identifier (e.g., schema name in PostgreSQL)
Implementations§
Trait Implementations§
Source§impl Clone for TenantContext
impl Clone for TenantContext
Source§fn clone(&self) -> TenantContext
fn clone(&self) -> TenantContext
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 TenantContext
impl Debug for TenantContext
Source§impl<'de> Deserialize<'de> for TenantContext
impl<'de> Deserialize<'de> for TenantContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TenantContext
Source§impl Hash for TenantContext
impl Hash for TenantContext
Source§impl PartialEq for TenantContext
impl PartialEq for TenantContext
Source§fn eq(&self, other: &TenantContext) -> bool
fn eq(&self, other: &TenantContext) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TenantContext
impl Serialize for TenantContext
impl StructuralPartialEq for TenantContext
Auto Trait Implementations§
impl Freeze for TenantContext
impl RefUnwindSafe for TenantContext
impl Send for TenantContext
impl Sync for TenantContext
impl Unpin for TenantContext
impl UnsafeUnpin for TenantContext
impl UnwindSafe for TenantContext
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