[][src]Trait casbin::Adapter

pub trait Adapter: Send + Sync {
#[must_use]    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] 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] 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] 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] 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] 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] 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]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]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]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]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]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]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]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, 

Loading content...

Implementations on Foreign Types

impl<T: Adapter + ?Sized> Adapter for Box<T>[src]

Loading content...

Implementors

impl Adapter for MemoryAdapter[src]

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

Loading content...