pub struct IsolationManager { /* private fields */ }Expand description
Resource isolation manager.
Implementations§
Source§impl IsolationManager
impl IsolationManager
Sourcepub fn assign_resource(
&self,
tenant_id: String,
resource_id: String,
) -> Result<()>
pub fn assign_resource( &self, tenant_id: String, resource_id: String, ) -> Result<()>
Assign resource to tenant.
Sourcepub fn owns_resource(&self, tenant_id: &str, resource_id: &str) -> bool
pub fn owns_resource(&self, tenant_id: &str, resource_id: &str) -> bool
Check if tenant owns resource.
Sourcepub fn get_resources(&self, tenant_id: &str) -> Vec<String>
pub fn get_resources(&self, tenant_id: &str) -> Vec<String>
Get all resources for tenant.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IsolationManager
impl !RefUnwindSafe for IsolationManager
impl Send for IsolationManager
impl Sync for IsolationManager
impl Unpin for IsolationManager
impl UnsafeUnpin for IsolationManager
impl !UnwindSafe for IsolationManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more