pub struct SecuredObjectSpace { /* private fields */ }Expand description
A unit of work that only does what the person signed in can do, whoever asks: a screen, an action or a call with no screen around it.
A record they cannot read is not there. A field they cannot read reads as empty, also for filters and sorting, so a filter cannot be used to guess it, and writing it back empty leaves what is stored.
Implementations§
Source§impl SecuredObjectSpace
impl SecuredObjectSpace
Sourcepub fn new(inner: Box<dyn ObjectSpace>, context: Rc<SecurityContext>) -> Self
pub fn new(inner: Box<dyn ObjectSpace>, context: Rc<SecurityContext>) -> Self
Over this, for the person of this context.
Trait Implementations§
Source§impl Debug for SecuredObjectSpace
impl Debug for SecuredObjectSpace
Source§impl ObjectSpace for SecuredObjectSpace
impl ObjectSpace for SecuredObjectSpace
Source§fn entities(&self) -> Vec<EntityInfo>
fn entities(&self) -> Vec<EntityInfo>
The entities it knows.
Source§fn query(&self, entity: &str, query: &Query) -> Result<Vec<Object>, SpaceError>
fn query(&self, entity: &str, query: &Query) -> Result<Vec<Object>, SpaceError>
Reads records.
Source§fn find(&self, entity: &str, key: &Value) -> Result<Option<Object>, SpaceError>
fn find(&self, entity: &str, key: &Value) -> Result<Option<Object>, SpaceError>
Reads one record by its key.
Source§fn new_object(&mut self, entity: &str) -> Result<Object, SpaceError>
fn new_object(&mut self, entity: &str) -> Result<Object, SpaceError>
A record with what a new one starts with, kept only once
saved.Source§fn save(&mut self, object: Object) -> Result<(), SpaceError>
fn save(&mut self, object: Object) -> Result<(), SpaceError>
Marks a record as new or changed, by its key.
Source§fn insert(&mut self, object: Object) -> Result<(), SpaceError>
fn insert(&mut self, object: Object) -> Result<(), SpaceError>
Marks a record as new, refusing a key already in use, as a form creating
a record has to: it must not take over the record with that key.
Source§fn delete(&mut self, entity: &str, key: &Value) -> Result<(), SpaceError>
fn delete(&mut self, entity: &str, key: &Value) -> Result<(), SpaceError>
Marks a record to go away.
Source§fn is_modified(&self) -> bool
fn is_modified(&self) -> bool
Whether anything waits for a commit.
Source§fn on_event(&mut self, watcher: SpaceWatcher)
fn on_event(&mut self, watcher: SpaceWatcher)
Calls this when something happens to the space.
Auto Trait Implementations§
impl !RefUnwindSafe for SecuredObjectSpace
impl !Send for SecuredObjectSpace
impl !Sync for SecuredObjectSpace
impl !UnwindSafe for SecuredObjectSpace
impl Freeze for SecuredObjectSpace
impl Unpin for SecuredObjectSpace
impl UnsafeUnpin for SecuredObjectSpace
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
Source§impl<S> ObjectSpaceExt for Swhere
S: ObjectSpace + ?Sized,
impl<S> ObjectSpaceExt for Swhere
S: ObjectSpace + ?Sized,
Source§fn add<T>(&mut self, record: &T) -> Result<(), SpaceError>where
T: BusinessObject,
fn add<T>(&mut self, record: &T) -> Result<(), SpaceError>where
T: BusinessObject,
Marks this as a new record. A numbered key left at zero gets the next number.
Source§fn read<T>(&self, query: &Query) -> Result<Vec<T>, SpaceError>where
T: BusinessObject,
fn read<T>(&self, query: &Query) -> Result<Vec<T>, SpaceError>where
T: BusinessObject,
Reads records.