pub struct NoCache;Expand description
No-op cache implementation.
Trait Implementations§
Source§impl Cache for NoCache
impl Cache for NoCache
Source§fn get_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tenant: &'life1 TenantId,
_principal: &'life2 PrincipalId,
) -> Pin<Box<dyn Future<Output = Option<Vec<Permission>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tenant: &'life1 TenantId,
_principal: &'life2 PrincipalId,
) -> Pin<Box<dyn Future<Output = Option<Vec<Permission>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets cached permissions for a (tenant, principal) pair.
Source§fn set_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tenant: &'life1 TenantId,
_principal: &'life2 PrincipalId,
_perms: Vec<Permission>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tenant: &'life1 TenantId,
_principal: &'life2 PrincipalId,
_perms: Vec<Permission>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sets cached permissions for a (tenant, principal) pair.
Source§fn invalidate_principal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tenant: &'life1 TenantId,
_principal: &'life2 PrincipalId,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn invalidate_principal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tenant: &'life1 TenantId,
_principal: &'life2 PrincipalId,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Invalidates cache for a principal.
Source§fn invalidate_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tenant: &'life1 TenantId,
_role: &'life2 RoleId,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn invalidate_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tenant: &'life1 TenantId,
_role: &'life2 RoleId,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Invalidates cache for a role.
impl Copy for NoCache
Auto Trait Implementations§
impl Freeze for NoCache
impl RefUnwindSafe for NoCache
impl Send for NoCache
impl Sync for NoCache
impl Unpin for NoCache
impl UnsafeUnpin for NoCache
impl UnwindSafe for NoCache
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