pub struct TenantRegistry { /* private fields */ }Expand description
In-memory projection of organizational tenants.
Reconstructed from WAL events at bootstrap via TenantRegistry::register.
Implementations§
Source§impl TenantRegistry
impl TenantRegistry
Sourcepub fn register(&mut self, registration: TenantRegistration)
pub fn register(&mut self, registration: TenantRegistration)
Registers a tenant.
Sourcepub fn exists(&self, tenant_id: TenantId) -> bool
pub fn exists(&self, tenant_id: TenantId) -> bool
Returns true if the tenant exists in the registry.
Sourcepub fn get(&self, tenant_id: TenantId) -> Option<&TenantRegistration>
pub fn get(&self, tenant_id: TenantId) -> Option<&TenantRegistration>
Returns the tenant registration, if known.
Sourcepub fn all(&self) -> impl Iterator<Item = &TenantRegistration>
pub fn all(&self) -> impl Iterator<Item = &TenantRegistration>
Returns an iterator over all registered tenants.
Trait Implementations§
Source§impl Default for TenantRegistry
impl Default for TenantRegistry
Source§fn default() -> TenantRegistry
fn default() -> TenantRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TenantRegistry
impl RefUnwindSafe for TenantRegistry
impl Send for TenantRegistry
impl Sync for TenantRegistry
impl Unpin for TenantRegistry
impl UnsafeUnpin for TenantRegistry
impl UnwindSafe for TenantRegistry
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