pub struct FieldAccess { /* private fields */ }Expand description
Who may view one field of a model’s records, and who may change it, which
ResourceDef::field_access declares: every resource the
panel mounts over the model obeys the rule.
A request the view rule refuses sees no column, filter, grouping, detail entry
or relation column reading the field, no export column, and no control for it: an edit keeps
the stored value, and a create takes the control’s default, else the blank answer. When the
field has no default and the record form requires it, or its rules refuse a blank answer, as
an accepted checkbox does, that request may not create. One the
edit rule refuses sees the control disabled. Either answers 400 to a submission
posting the field.
use tablo_core::FieldAccess;
FieldAccess::new().view(is_hr).edit(is_payroll);Implementations§
Trait Implementations§
Source§impl Clone for FieldAccess
impl Clone for FieldAccess
Source§impl Debug for FieldAccess
impl Debug for FieldAccess
Auto Trait Implementations§
impl !RefUnwindSafe for FieldAccess
impl !UnwindSafe for FieldAccess
impl Forget for FieldAccess
impl Freeze for FieldAccess
impl Move for FieldAccess
impl Send for FieldAccess
impl Sync for FieldAccess
impl Unpin for FieldAccess
impl UnsafeUnpin for FieldAccess
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