Skip to main content

TenantScopedEntity

Trait TenantScopedEntity 

Source
pub trait TenantScopedEntity: Entity {
    // Required method
    fn tenant_policy() -> Option<EntityPolicyMetadata>;
}
Expand description

Runtime metadata hook for entities that opt into tenant scoping.

Entities without #[orm(tenant = CurrentTenant)] return None and remain cross-tenant even when a context has an active tenant configured.

Required Methods§

Source

fn tenant_policy() -> Option<EntityPolicyMetadata>

Returns tenant-owned column metadata for tenant-scoped entities.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§