pub struct MemoryRbacStorage { /* private fields */ }Expand description
In-memory storage adapter for testing and development
Implementations§
Trait Implementations§
Source§impl Default for MemoryRbacStorage
impl Default for MemoryRbacStorage
Source§impl RoleStorage for MemoryRbacStorage
impl RoleStorage for MemoryRbacStorage
fn create_role<'life0, 'life1, 'async_trait>(
&'life0 self,
role: &'life1 StoredRole,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_role<'life0, 'life1, 'async_trait>(
&'life0 self,
role: &'life1 StoredRole,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_role<'life0, 'life1, 'async_trait>(
&'life0 self,
role_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_role<'life0, 'life1, 'async_trait>(
&'life0 self,
role_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<StoredRole>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_roles<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StoredRole>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_permission<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
permission: &'life2 StoredPermission,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_permission<'life0, 'life1, 'async_trait>(
&'life0 self,
permission_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<StoredPermission>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn assign_role<'life0, 'life1, 'async_trait>(
&'life0 self,
assignment: &'life1 RoleAssignment,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn revoke_role<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
role_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_user_roles<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_role_permissions<'life0, 'life1, 'async_trait>(
&'life0 self,
role_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn log_audit_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 AuditEntry,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for MemoryRbacStorage
impl !RefUnwindSafe for MemoryRbacStorage
impl Send for MemoryRbacStorage
impl Sync for MemoryRbacStorage
impl Unpin for MemoryRbacStorage
impl UnsafeUnpin for MemoryRbacStorage
impl !UnwindSafe for MemoryRbacStorage
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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