Trait casbin::RbacApi[][src]

pub trait RbacApi: MgmtApi {
#[must_use]    fn add_permission_for_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        permission: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn add_permissions_for_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        permissions: Vec<Vec<String>>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn add_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        role: &'life2 str,
        domain: Option<&'life3 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn add_roles_for_user<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        roles: Vec<String>,
        domain: Option<&'life2 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        role: &'life2 str,
        domain: Option<&'life3 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_roles_for_user<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        domain: Option<&'life2 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_role<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_permission_for_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        permission: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn get_roles_for_user(
        &mut self,
        name: &str,
        domain: Option<&str>
    ) -> Vec<String>;
fn get_users_for_role(
        &self,
        name: &str,
        domain: Option<&str>
    ) -> Vec<String>;
fn has_role_for_user(
        &mut self,
        name: &str,
        role: &str,
        domain: Option<&str>
    ) -> bool;
fn get_permissions_for_user(
        &self,
        user: &str,
        domain: Option<&str>
    ) -> Vec<Vec<String>>;
fn has_permission_for_user(
        &self,
        user: &str,
        permission: Vec<String>
    ) -> bool;
fn get_implicit_roles_for_user(
        &mut self,
        name: &str,
        domain: Option<&str>
    ) -> Vec<String>;
fn get_implicit_permissions_for_user(
        &mut self,
        name: &str,
        domain: Option<&str>
    ) -> Vec<Vec<String>>;
#[must_use] fn get_implicit_users_for_permission<'life0, 'async_trait>(
        &'life0 self,
        permission: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; #[must_use] fn delete_permission<'life0, 'async_trait>(
        &'life0 mut self,
        permission: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Send + 'async_trait
, { ... }
#[must_use] fn delete_permissions_for_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: Send + 'async_trait
, { ... } }

Required methods

#[must_use]fn add_permission_for_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    permission: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn add_permissions_for_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    permissions: Vec<Vec<String>>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn add_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    role: &'life2 str,
    domain: Option<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn add_roles_for_user<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    roles: Vec<String>,
    domain: Option<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn delete_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    role: &'life2 str,
    domain: Option<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn delete_roles_for_user<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    domain: Option<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn delete_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn delete_role<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn delete_permission_for_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    permission: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

fn get_roles_for_user(
    &mut self,
    name: &str,
    domain: Option<&str>
) -> Vec<String>
[src]

fn get_users_for_role(&self, name: &str, domain: Option<&str>) -> Vec<String>[src]

fn has_role_for_user(
    &mut self,
    name: &str,
    role: &str,
    domain: Option<&str>
) -> bool
[src]

fn get_permissions_for_user(
    &self,
    user: &str,
    domain: Option<&str>
) -> Vec<Vec<String>>
[src]

fn has_permission_for_user(&self, user: &str, permission: Vec<String>) -> bool[src]

fn get_implicit_roles_for_user(
    &mut self,
    name: &str,
    domain: Option<&str>
) -> Vec<String>
[src]

fn get_implicit_permissions_for_user(
    &mut self,
    name: &str,
    domain: Option<&str>
) -> Vec<Vec<String>>
[src]

#[must_use]fn get_implicit_users_for_permission<'life0, 'async_trait>(
    &'life0 self,
    permission: Vec<String>
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Provided methods

#[must_use]fn delete_permission<'life0, 'async_trait>(
    &'life0 mut self,
    permission: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Send + 'async_trait, 
[src]

#[must_use]fn delete_permissions_for_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: Send + 'async_trait, 
[src]

Loading content...

Implementors

impl<T> RbacApi for T where
    T: MgmtApi
[src]

Loading content...