pub trait HasTenant {
// Required method
fn tenant(&self) -> &TenantContext;
// Provided methods
fn tenant_id(&self) -> Option<Uuid> { ... }
fn require_tenant(&self) -> Result<Uuid> { ... }
}Expand description
Trait for contexts that have tenant information.
Required Methods§
Sourcefn tenant(&self) -> &TenantContext
fn tenant(&self) -> &TenantContext
Get the tenant context.
Provided Methods§
Sourcefn require_tenant(&self) -> Result<Uuid>
fn require_tenant(&self) -> Result<Uuid>
Require a tenant ID.