pub struct TenantManager { /* private fields */ }Expand description
Multi-tenant manager.
Implementations§
Source§impl TenantManager
impl TenantManager
pub fn new() -> Self
pub fn register(&self, tenant: Tenant)
pub fn get(&self, quorum_id: &str) -> Option<Tenant>
pub fn can_create_session(&self, quorum_id: &str) -> bool
pub fn increment_sessions(&self, quorum_id: &str) -> bool
pub fn decrement_sessions(&self, quorum_id: &str)
pub fn is_scheme_allowed(&self, quorum_id: &str, scheme: &str) -> bool
pub fn tenant_count(&self) -> usize
pub fn remove(&self, quorum_id: &str)
Trait Implementations§
Source§impl Default for TenantManager
impl Default for TenantManager
Source§fn default() -> TenantManager
fn default() -> TenantManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for TenantManager
impl RefUnwindSafe for TenantManager
impl Send for TenantManager
impl Sync for TenantManager
impl Unpin for TenantManager
impl UnsafeUnpin for TenantManager
impl UnwindSafe for TenantManager
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