[−][src]Struct casbin::FileAdapter
Fields
file_path: String
Methods
impl FileAdapter
[src]
pub fn new(path: &str) -> Self
[src]
pub fn load_policy_file(
&self,
m: &mut Model,
handler: fn(_: String, _: &mut Model)
) -> Result<()>
[src]
&self,
m: &mut Model,
handler: fn(_: String, _: &mut Model)
) -> Result<()>
pub fn save_policy_file(&self, text: String) -> Result<()>
[src]
Trait Implementations
impl Adapter for FileAdapter
[src]
fn load_policy(&self, m: &mut Model) -> Result<()>
[src]
fn save_policy(&self, m: &mut Model) -> Result<()>
[src]
fn add_policy(
&mut self,
_sec: &str,
_ptype: &str,
_rule: Vec<&str>
) -> Result<bool>
[src]
&mut self,
_sec: &str,
_ptype: &str,
_rule: Vec<&str>
) -> Result<bool>
fn remove_policy(
&self,
_sec: &str,
_ptype: &str,
_rule: Vec<&str>
) -> Result<bool>
[src]
&self,
_sec: &str,
_ptype: &str,
_rule: Vec<&str>
) -> Result<bool>
fn remove_filtered_policy(
&self,
_sec: &str,
_ptype: &str,
_field_index: usize,
_field_values: Vec<&str>
) -> Result<bool>
[src]
&self,
_sec: &str,
_ptype: &str,
_field_index: usize,
_field_values: Vec<&str>
) -> Result<bool>
Auto Trait Implementations
impl RefUnwindSafe for FileAdapter
impl Send for FileAdapter
impl Sync for FileAdapter
impl Unpin for FileAdapter
impl UnwindSafe for FileAdapter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,