#[non_exhaustive]pub enum FieldAccessFault {
Duplicate,
Inverse,
SoftDelete,
RecordTitle,
RecordKey,
Watched,
UndeclaredReads {
what: &'static str,
name: String,
},
UnmaskedRelation {
name: String,
model: String,
},
UnresolvedRelation {
name: String,
},
NarrowedBy {
field: String,
},
}Expand description
Why a field_access cannot hide its field everywhere the
panel shows it:
DeclarationErrorKind::FieldAccess.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Duplicate
Two declarations over one field.
Declare it once, with both its view and its edit rule.
Inverse
The field is the inverse side of a relation, a #[has_many] or a #[has_one], whose
records the related resource’s relation table and policy show and link.
Restrict them with the related resource’s policy.
SoftDelete
The field is the soft-delete column, whose state the trash control and the Restore buttons show every user.
Restrict restores and force deletes with the policy’s Restore and ForceDelete.
RecordTitle
The record title reads the field, and every page and relationship choice names a record
by its title. Asked of a rule with a view rule only.
Title the record by a field every user may view.
RecordKey
A rule hides a primary key. The key is every record’s URL id and its default label, which every page and relationship choice shows, so no user may be kept from seeing it.
Restrict a field that is not the key.
Watched
A form condition, a dependent choice or another field’s comparison watches the field, so
what the form shows or refuses would tell what it holds. Asked of a rule with a view
rule only.
Watch or compare with a field every user may view.
UndeclaredReads
A column or a filter of a resource over a model a panel restricts a field of does not declare the fields it reads, so the panel cannot tell whether it shows the restricted one. A custom filter must declare them once any mounted resource restricts a field, of whichever model.
Declare .reading(Reads::of(..)) on a ComputedColumn, a described TextColumn, a row
color or a row link, or implement reads on a custom column or filter. A QueryFilter, a
tab and a summary read theirs off their predicates.
Fields
UnmaskedRelation
A column or a filter reads records of a model a mounted resource restricts a field of, under no field access a panel can mask.
Show the records through a mounted resource: RelationColumn::new::<R> naming the fields it
reads, RelationColumn::of::<R> for their title, or a relationship filter over the foreign
key. A closure over the row that declares it reads only the row’s own fields reads a copy
without its relations, which a page loading them does not refuse.
UnresolvedRelation
A column or a filter reads a relation the mount cannot read off the model’s schema, so it cannot tell whether the relation reaches records a mounted resource restricts.
Declare the relation as a Deferred field of the model.
NarrowedBy
A dependent choice narrows its options by a field a mounted resource restricts, so the options would show which records hold each value of it.
Narrow by a field every user may view.
Trait Implementations§
Source§impl Clone for FieldAccessFault
impl Clone for FieldAccessFault
Source§impl Debug for FieldAccessFault
impl Debug for FieldAccessFault
Source§impl Display for FieldAccessFault
impl Display for FieldAccessFault
impl Eq for FieldAccessFault
Source§impl PartialEq for FieldAccessFault
impl PartialEq for FieldAccessFault
impl StructuralPartialEq for FieldAccessFault
Auto Trait Implementations§
impl Forget for FieldAccessFault
impl Freeze for FieldAccessFault
impl Move for FieldAccessFault
impl RefUnwindSafe for FieldAccessFault
impl Send for FieldAccessFault
impl Sync for FieldAccessFault
impl Unpin for FieldAccessFault
impl UnsafeUnpin for FieldAccessFault
impl UnwindSafe for FieldAccessFault
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.