#[non_exhaustive]pub enum ManyToManyFault {
NotJoinModel,
CompositeKey,
UnwritableColumn {
model: String,
column: String,
},
NotMultipleChoice,
OtherSource,
NoJoin,
}Expand description
Why a many-to-many field or relation cannot link records:
DeclarationErrorKind::ManyToMany.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotJoinModel
The field is no #[has_many(via = joins.target)] stepping through a has_many to a join
model, then the join model’s belongs_to to the target.
Declare it through a has_many to the join model and the join model’s belongs_to.
CompositeKey
A foreign key of the join model spans several columns, or references no single-column primary key.
Key each side by one column.
UnwritableColumn
The join model has a column a new link cannot fill: not nullable, not #[auto], and not
one of its two foreign keys.
Make it nullable or #[auto], or link the records in your own record fn.
NotMultipleChoice
The form’s control for the field is not a multiple choice over a relationship.
Declare .choice().relationship::<R>().multiple().
OtherSource
The relationship’s records are not the target’s.
Point the relationship at the target’s resource.
NoJoin
A multiple choice in a resource’s form over no many-to-many field, which no column stores.
Bind it to a #[has_many(via = ..)] field.
Trait Implementations§
Source§impl Clone for ManyToManyFault
impl Clone for ManyToManyFault
Source§impl Debug for ManyToManyFault
impl Debug for ManyToManyFault
impl Eq for ManyToManyFault
Source§impl PartialEq for ManyToManyFault
impl PartialEq for ManyToManyFault
impl StructuralPartialEq for ManyToManyFault
Auto Trait Implementations§
impl Freeze for ManyToManyFault
impl RefUnwindSafe for ManyToManyFault
impl Send for ManyToManyFault
impl Sync for ManyToManyFault
impl Unpin for ManyToManyFault
impl UnsafeUnpin for ManyToManyFault
impl UnwindSafe for ManyToManyFault
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
impl<T> CloneAny for T
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.