#[non_exhaustive]pub enum ForeignKeyAction {
Restrict,
Cascade,
SetNull,
SetDefault,
NoAction,
}Expand description
Foreign key action
This enum represents actions for foreign key constraints.
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.
Restrict
RESTRICT - Reject the delete/update
Cascade
CASCADE - Delete/update the referencing rows
SetNull
SET NULL - Set the foreign key column(s) to NULL
SetDefault
SET DEFAULT - Set the foreign key column(s) to their default values
NoAction
NO ACTION - Similar to RESTRICT (default)
Implementations§
Trait Implementations§
Source§impl Clone for ForeignKeyAction
impl Clone for ForeignKeyAction
Source§fn clone(&self) -> ForeignKeyAction
fn clone(&self) -> ForeignKeyAction
Returns a duplicate 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 ForeignKeyAction
impl Debug for ForeignKeyAction
Source§impl PartialEq for ForeignKeyAction
impl PartialEq for ForeignKeyAction
impl Copy for ForeignKeyAction
impl Eq for ForeignKeyAction
impl StructuralPartialEq for ForeignKeyAction
Auto Trait Implementations§
impl Freeze for ForeignKeyAction
impl RefUnwindSafe for ForeignKeyAction
impl Send for ForeignKeyAction
impl Sync for ForeignKeyAction
impl Unpin for ForeignKeyAction
impl UnsafeUnpin for ForeignKeyAction
impl UnwindSafe for ForeignKeyAction
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