[][src]Trait casbin::Adapter

pub trait Adapter: Send + Sync {
#[must_use]    pub fn load_policy<'life0, 'life1, 'async_trait>(
        &'life0 self,
        m: &'life1 mut dyn Model
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        m: &'life1 mut dyn Model,
        f: Filter<'a>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn save_policy<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        m: &'life1 mut dyn Model
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn clear_policy<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
pub fn is_filtered(&self) -> bool;
#[must_use] pub fn add_policy<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        sec: &'life1 str,
        ptype: &'life2 str,
        rule: Vec<String>
    ) -> 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] pub fn add_policies<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        sec: &'life1 str,
        ptype: &'life2 str,
        rules: Vec<Vec<String>>
    ) -> 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] pub fn remove_policy<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        sec: &'life1 str,
        ptype: &'life2 str,
        rule: Vec<String>
    ) -> 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] pub fn remove_policies<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        sec: &'life1 str,
        ptype: &'life2 str,
        rules: Vec<Vec<String>>
    ) -> 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] pub fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        sec: &'life1 str,
        ptype: &'life2 str,
        field_index: usize,
        field_values: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }

Required methods

#[must_use]pub fn load_policy<'life0, 'life1, 'async_trait>(
    &'life0 self,
    m: &'life1 mut dyn Model
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn load_filtered_policy<'a, 'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    m: &'life1 mut dyn Model,
    f: Filter<'a>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'a: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]pub fn save_policy<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    m: &'life1 mut dyn Model
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

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

pub fn is_filtered(&self) -> bool[src]

#[must_use]pub fn add_policy<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    sec: &'life1 str,
    ptype: &'life2 str,
    rule: Vec<String>
) -> 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]pub fn add_policies<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    sec: &'life1 str,
    ptype: &'life2 str,
    rules: Vec<Vec<String>>
) -> 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]pub fn remove_policy<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    sec: &'life1 str,
    ptype: &'life2 str,
    rule: Vec<String>
) -> 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]pub fn remove_policies<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    sec: &'life1 str,
    ptype: &'life2 str,
    rules: Vec<Vec<String>>
) -> 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]pub fn remove_filtered_policy<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    sec: &'life1 str,
    ptype: &'life2 str,
    field_index: usize,
    field_values: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Implementors

impl Adapter for MemoryAdapter[src]

impl Adapter for NullAdapter[src]

impl<P> Adapter for FileAdapter<P> where
    P: AsRef<Path> + Send + Sync
[src]

Loading content...