Skip to main content

RoleStore

Trait RoleStore 

Source
pub trait RoleStore: Roles + 'static {
    // Required method
    fn set<'life0, 'life1, 'async_trait>(
        &'life0 self,
        role: &'life1 RoleName,
        grants: GrantSet,
    ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Roles an admin can edit (auth.role_set). The gate reads the same store, so an edit reaches the next call and the next view.

Required Methods§

Source

fn set<'life0, 'life1, 'async_trait>( &'life0 self, role: &'life1 RoleName, grants: GrantSet, ) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Replace role’s grants. Never called for ADMIN.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§