pub struct MemoryStore { /* private fields */ }Expand description
Tuples in memory: for tests, small apps, and tuples seeded from the config file. Lost on restart.
Implementations§
Source§impl MemoryStore
impl MemoryStore
pub fn new() -> MemoryStore
Trait Implementations§
Source§impl Default for MemoryStore
impl Default for MemoryStore
Source§impl TupleStore for MemoryStore
impl TupleStore for MemoryStore
Source§fn write(&self, tuple: &Tuple) -> Result<bool, AuthzError>
fn write(&self, tuple: &Tuple) -> Result<bool, AuthzError>
Store
tuple; true if it wasn’t there.Source§fn delete(&self, tuple: &Tuple) -> Result<bool, AuthzError>
fn delete(&self, tuple: &Tuple) -> Result<bool, AuthzError>
Remove
tuple; true if it was there.Source§fn read(
&self,
object: &ObjectRef,
relation: &str,
) -> Result<Vec<Subject>, AuthzError>
fn read( &self, object: &ObjectRef, relation: &str, ) -> Result<Vec<Subject>, AuthzError>
The subjects with
relation on object.Source§fn list(
&self,
filter: &TupleFilter,
limit: usize,
) -> Result<Vec<Tuple>, AuthzError>
fn list( &self, filter: &TupleFilter, limit: usize, ) -> Result<Vec<Tuple>, AuthzError>
Tuples matching
filter, at most limit.Auto Trait Implementations§
impl !Freeze for MemoryStore
impl RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl UnsafeUnpin for MemoryStore
impl UnwindSafe for MemoryStore
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