Struct casbin::DefaultModel
source · pub struct DefaultModel { /* private fields */ }
Implementations§
source§impl DefaultModel
impl DefaultModel
Trait Implementations§
source§impl Clone for DefaultModel
impl Clone for DefaultModel
source§fn clone(&self) -> DefaultModel
fn clone(&self) -> DefaultModel
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for DefaultModel
impl Default for DefaultModel
source§fn default() -> DefaultModel
fn default() -> DefaultModel
Returns the “default value” for a type. Read more
source§impl Model for DefaultModel
impl Model for DefaultModel
fn add_def(&mut self, sec: &str, key: &str, value: &str) -> bool
fn get_model(&self) -> &HashMap<String, LinkedHashMap<String, Assertion>>
fn get_mut_model( &mut self ) -> &mut HashMap<String, LinkedHashMap<String, Assertion>>
fn build_role_links(&mut self, rm: Arc<RwLock<dyn RoleManager>>) -> Result<()>
fn build_incremental_role_links( &mut self, rm: Arc<RwLock<dyn RoleManager>>, d: EventData ) -> Result<()>
fn add_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool
fn add_policies( &mut self, sec: &str, ptype: &str, rules: Vec<Vec<String>> ) -> bool
fn get_policy(&self, sec: &str, ptype: &str) -> Vec<Vec<String>>
fn get_filtered_policy( &self, sec: &str, ptype: &str, field_index: usize, field_values: Vec<String> ) -> Vec<Vec<String>>
fn has_policy(&self, sec: &str, ptype: &str, rule: Vec<String>) -> bool
fn get_values_for_field_in_policy( &self, sec: &str, ptype: &str, field_index: usize ) -> Vec<String>
fn remove_policy(&mut self, sec: &str, ptype: &str, rule: Vec<String>) -> bool
fn remove_policies( &mut self, sec: &str, ptype: &str, rules: Vec<Vec<String>> ) -> bool
fn clear_policy(&mut self)
fn remove_filtered_policy( &mut self, sec: &str, ptype: &str, field_index: usize, field_values: Vec<String> ) -> (bool, Vec<Vec<String>>)
Auto Trait Implementations§
impl !RefUnwindSafe for DefaultModel
impl Send for DefaultModel
impl Sync for DefaultModel
impl Unpin for DefaultModel
impl !UnwindSafe for DefaultModel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more