pub trait RoleStorage: Send + Sync {
// Required methods
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;
}Expand description
Async storage trait for persisting RBAC data (roles, permissions, assignments, audit)