#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
CompositeKey
A foreign key of the join model spans several columns, or references no single-column primary key.
UnwritableColumn
The join model has a column a new link cannot fill: not nullable, not #[auto], and not
one of its two foreign keys.
NotMultipleChoice
The form’s control for the field is not a multiple choice over a relationship.
OtherSource
The relationship’s records are not the target’s.
NoJoin
A multiple choice in a resource’s form over no many-to-many field, which no column stores.
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.