[][src]Trait casbin::MgmtApi

pub trait MgmtApi {
    fn get_policy(&self) -> Vec<Vec<String>>;
fn get_named_policy(&self, ptype: &str) -> Vec<Vec<String>>;
fn get_filtered_policy(
        &self,
        field_index: usize,
        field_values: Vec<&str>
    ) -> Vec<Vec<String>>;
fn get_filtered_named_policy(
        &self,
        ptype: &str,
        field_index: usize,
        field_values: Vec<&str>
    ) -> Vec<Vec<String>>;
fn has_policy(&self, params: Vec<&str>) -> bool;
fn has_named_policy(&self, ptype: &str, params: Vec<&str>) -> bool;
fn add_policy<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        params: Vec<&'life1 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn remove_policy<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        params: Vec<&'life1 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn add_named_policy<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        ptype: &'life1 str,
        params: Vec<&'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
;
fn remove_named_policy<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        ptype: &'life1 str,
        params: Vec<&'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
;
fn add_grouping_policy<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        params: Vec<&'life1 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn remove_grouping_policy<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        params: Vec<&'life1 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn get_grouping_policy(&self) -> Vec<Vec<String>>;
fn get_named_grouping_policy(&self, ptype: &str) -> Vec<Vec<String>>;
fn get_filtered_grouping_policy(
        &self,
        field_index: usize,
        field_values: Vec<&str>
    ) -> Vec<Vec<String>>;
fn get_filtered_named_grouping_policy(
        &self,
        ptype: &str,
        field_index: usize,
        field_values: Vec<&str>
    ) -> Vec<Vec<String>>;
fn has_grouping_policy(&self, params: Vec<&str>) -> bool;
fn has_grouping_named_policy(&self, ptype: &str, params: Vec<&str>) -> bool;
fn add_named_grouping_policy<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        ptype: &'life1 str,
        params: Vec<&'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
;
fn remove_named_grouping_policy<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        ptype: &'life1 str,
        params: Vec<&'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
;
fn remove_filtered_policy<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        field_index: usize,
        field_values: Vec<&'life1 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn remove_filtered_grouping_policy<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        field_index: usize,
        field_values: Vec<&'life1 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn remove_filtered_named_policy<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        ptype: &'life1 str,
        field_index: usize,
        field_values: Vec<&'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
;
fn remove_filtered_named_grouping_policy<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        ptype: &'life1 str,
        field_index: usize,
        field_values: Vec<&'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
;
fn get_all_subjects(&self) -> Vec<String>;
fn get_all_named_subjects(&self, ptype: &str) -> Vec<String>;
fn get_all_objects(&self) -> Vec<String>;
fn get_all_named_objects(&self, ptype: &str) -> Vec<String>;
fn get_all_actions(&self) -> Vec<String>;
fn get_all_named_actions(&self, ptype: &str) -> Vec<String>;
fn get_all_roles(&self) -> Vec<String>;
fn get_all_named_roles(&self, ptype: &str) -> Vec<String>; }

Required methods

fn get_policy(&self) -> Vec<Vec<String>>

fn get_named_policy(&self, ptype: &str) -> Vec<Vec<String>>

fn get_filtered_policy(
    &self,
    field_index: usize,
    field_values: Vec<&str>
) -> Vec<Vec<String>>

fn get_filtered_named_policy(
    &self,
    ptype: &str,
    field_index: usize,
    field_values: Vec<&str>
) -> Vec<Vec<String>>

fn has_policy(&self, params: Vec<&str>) -> bool

fn has_named_policy(&self, ptype: &str, params: Vec<&str>) -> bool

fn add_policy<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    params: Vec<&'life1 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

fn remove_policy<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    params: Vec<&'life1 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

fn add_named_policy<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    ptype: &'life1 str,
    params: Vec<&'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, 

fn remove_named_policy<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    ptype: &'life1 str,
    params: Vec<&'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, 

fn add_grouping_policy<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    params: Vec<&'life1 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

fn remove_grouping_policy<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    params: Vec<&'life1 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

fn get_grouping_policy(&self) -> Vec<Vec<String>>

fn get_named_grouping_policy(&self, ptype: &str) -> Vec<Vec<String>>

fn get_filtered_grouping_policy(
    &self,
    field_index: usize,
    field_values: Vec<&str>
) -> Vec<Vec<String>>

fn get_filtered_named_grouping_policy(
    &self,
    ptype: &str,
    field_index: usize,
    field_values: Vec<&str>
) -> Vec<Vec<String>>

fn has_grouping_policy(&self, params: Vec<&str>) -> bool

fn has_grouping_named_policy(&self, ptype: &str, params: Vec<&str>) -> bool

fn add_named_grouping_policy<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    ptype: &'life1 str,
    params: Vec<&'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, 

fn remove_named_grouping_policy<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    ptype: &'life1 str,
    params: Vec<&'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, 

fn remove_filtered_policy<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    field_index: usize,
    field_values: Vec<&'life1 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

fn remove_filtered_grouping_policy<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    field_index: usize,
    field_values: Vec<&'life1 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

fn remove_filtered_named_policy<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    ptype: &'life1 str,
    field_index: usize,
    field_values: Vec<&'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, 

fn remove_filtered_named_grouping_policy<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    ptype: &'life1 str,
    field_index: usize,
    field_values: Vec<&'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, 

fn get_all_subjects(&self) -> Vec<String>

fn get_all_named_subjects(&self, ptype: &str) -> Vec<String>

fn get_all_objects(&self) -> Vec<String>

fn get_all_named_objects(&self, ptype: &str) -> Vec<String>

fn get_all_actions(&self) -> Vec<String>

fn get_all_named_actions(&self, ptype: &str) -> Vec<String>

fn get_all_roles(&self) -> Vec<String>

fn get_all_named_roles(&self, ptype: &str) -> Vec<String>

Loading content...

Implementors

impl MgmtApi for CachedEnforcer[src]

impl MgmtApi for Enforcer[src]

Loading content...