[][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(&mut self, params: Vec<&str>) -> Result<bool>;
fn remove_policy(&mut self, params: Vec<&str>) -> Result<bool>;
fn add_named_policy(
        &mut self,
        ptype: &str,
        params: Vec<&str>
    ) -> Result<bool>;
fn remove_named_policy(
        &mut self,
        ptype: &str,
        params: Vec<&str>
    ) -> Result<bool>;
fn add_grouping_policy(&mut self, params: Vec<&str>) -> Result<bool>;
fn remove_grouping_policy(&mut self, params: Vec<&str>) -> Result<bool>;
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(
        &mut self,
        ptype: &str,
        params: Vec<&str>
    ) -> Result<bool>;
fn remove_named_grouping_policy(
        &mut self,
        ptype: &str,
        params: Vec<&str>
    ) -> Result<bool>;
fn remove_filtered_policy(
        &mut self,
        field_index: usize,
        field_values: Vec<&str>
    ) -> Result<bool>;
fn remove_filtered_grouping_policy(
        &mut self,
        field_index: usize,
        field_values: Vec<&str>
    ) -> Result<bool>;
fn remove_filtered_named_policy(
        &mut self,
        ptype: &str,
        field_index: usize,
        field_values: Vec<&str>
    ) -> Result<bool>;
fn remove_filtered_named_grouping_policy(
        &mut self,
        ptype: &str,
        field_index: usize,
        field_values: Vec<&str>
    ) -> Result<bool>;
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(&mut self, params: Vec<&str>) -> Result<bool>

fn remove_policy(&mut self, params: Vec<&str>) -> Result<bool>

fn add_named_policy(&mut self, ptype: &str, params: Vec<&str>) -> Result<bool>

fn remove_named_policy(
    &mut self,
    ptype: &str,
    params: Vec<&str>
) -> Result<bool>

fn add_grouping_policy(&mut self, params: Vec<&str>) -> Result<bool>

fn remove_grouping_policy(&mut self, params: Vec<&str>) -> Result<bool>

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(
    &mut self,
    ptype: &str,
    params: Vec<&str>
) -> Result<bool>

fn remove_named_grouping_policy(
    &mut self,
    ptype: &str,
    params: Vec<&str>
) -> Result<bool>

fn remove_filtered_policy(
    &mut self,
    field_index: usize,
    field_values: Vec<&str>
) -> Result<bool>

fn remove_filtered_grouping_policy(
    &mut self,
    field_index: usize,
    field_values: Vec<&str>
) -> Result<bool>

fn remove_filtered_named_policy(
    &mut self,
    ptype: &str,
    field_index: usize,
    field_values: Vec<&str>
) -> Result<bool>

fn remove_filtered_named_grouping_policy(
    &mut self,
    ptype: &str,
    field_index: usize,
    field_values: Vec<&str>
) -> Result<bool>

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<A: Adapter> MgmtApi for Enforcer<A>[src]

Loading content...