pub enum ConstraintScope {
GlobalKeyIndex,
GlobalForeignKey,
GlobalPrimaryKeyKeyIndex,
GlobalPrimaryKeyForeignKeyDefault,
ModelKeyIndex,
ModelPrimaryKeyKeyIndex,
ModelPrimaryKeyKeyIndexForeignKey,
}
Expand description
A scope where a constraint name must be unique.
Variants§
GlobalKeyIndex
Globally indices and unique constraints
GlobalForeignKey
Globally foreign keys
GlobalPrimaryKeyKeyIndex
Globally primary keys, indices and unique constraints
GlobalPrimaryKeyForeignKeyDefault
Globally primary keys, foreign keys and default constraints
ModelKeyIndex
Per model indices and unique constraints
ModelPrimaryKeyKeyIndex
Per model primary keys, indices and unique constraints
ModelPrimaryKeyKeyIndexForeignKey
Per model primary keys, foreign keys, indices and unique constraints
Implementations§
source§impl ConstraintScope
impl ConstraintScope
sourcepub fn description(self, model_name: &str) -> Cow<'static, str>
pub fn description(self, model_name: &str) -> Cow<'static, str>
A beefed-up display for errors.
Trait Implementations§
source§impl Clone for ConstraintScope
impl Clone for ConstraintScope
source§fn clone(&self) -> ConstraintScope
fn clone(&self) -> ConstraintScope
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ConstraintScope
impl Debug for ConstraintScope
source§impl Hash for ConstraintScope
impl Hash for ConstraintScope
source§impl Ord for ConstraintScope
impl Ord for ConstraintScope
source§fn cmp(&self, other: &ConstraintScope) -> Ordering
fn cmp(&self, other: &ConstraintScope) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ConstraintScope
impl PartialEq for ConstraintScope
source§fn eq(&self, other: &ConstraintScope) -> bool
fn eq(&self, other: &ConstraintScope) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ConstraintScope
impl PartialOrd for ConstraintScope
source§fn partial_cmp(&self, other: &ConstraintScope) -> Option<Ordering>
fn partial_cmp(&self, other: &ConstraintScope) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ConstraintScope
impl Eq for ConstraintScope
impl StructuralEq for ConstraintScope
impl StructuralPartialEq for ConstraintScope
Auto Trait Implementations§
impl RefUnwindSafe for ConstraintScope
impl Send for ConstraintScope
impl Sync for ConstraintScope
impl Unpin for ConstraintScope
impl UnwindSafe for ConstraintScope
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
source§impl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere T: Hash + ?Sized,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.