#[non_exhaustive]pub enum RelatedFormFault {
NoOwnerForm,
NoForm,
UnboundForeignKey {
column: String,
},
SoftDeletes,
OwnKeys {
field: String,
},
ShadowedKey {
field: String,
},
}Expand description
Why a Relation::has_one cannot render its related resource’s
form inside the owner’s:
DeclarationErrorKind::RelatedForm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoOwnerForm
The owner has no form for the related form to render in.
Give the owner a form, or declare a has_many relation, which renders a table.
NoForm
The related resource has no form.
Give it a form.
UnboundForeignKey
The related resource’s form binds no control for the foreign key, which the owner’s key fills.
Bind the foreign key in its form.
SoftDeletes
The related resource soft-deletes: a trashed child would stay the record’s while the form created another.
Declare a has_many relation, whose table offers the trashed records.
OwnKeys
The related form holds a control that posts keys besides its own or fetches from its resource’s routes: a file field, a repeater, an embedded value, a searchable or dependent choice.
Leave the field out of the related resource’s form, or declare a has_many relation.
ShadowedKey
An owner form key is the related resource’s slug, or starts with the related form’s prefix, the slug and a dot, under which the related form’s controls post.
Rename the field, or give the related resource another slug.
Trait Implementations§
Source§impl Clone for RelatedFormFault
impl Clone for RelatedFormFault
Source§impl Debug for RelatedFormFault
impl Debug for RelatedFormFault
impl Eq for RelatedFormFault
Source§impl PartialEq for RelatedFormFault
impl PartialEq for RelatedFormFault
impl StructuralPartialEq for RelatedFormFault
Auto Trait Implementations§
impl Forget for RelatedFormFault
impl Freeze for RelatedFormFault
impl RefUnwindSafe for RelatedFormFault
impl Send for RelatedFormFault
impl Sync for RelatedFormFault
impl Unpin for RelatedFormFault
impl UnsafeUnpin for RelatedFormFault
impl UnwindSafe for RelatedFormFault
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.