pub struct ForeignKey { /* private fields */ }
Expand description
Defines a Foreign Key for a Column. It is an Error for the foreign_table
and foreign_column
Strings to be Empty (Error::EmptyForeignTableName, Error::EmptyForeignColumnName).
Implementations§
Source§impl ForeignKey
impl ForeignKey
pub fn new( foreign_table: String, foreign_column: String, on_delete: Option<FKOnAction>, on_update: Option<FKOnAction>, deferrable: bool, ) -> Self
pub fn new_default(foreign_table: String, foreign_column: String) -> Self
pub fn set_foreign_table(self, foreign_table: String) -> Self
pub fn set_foreign_column(self, foreign_column: String) -> Self
pub fn set_on_delete(self, on_delete: Option<FKOnAction>) -> Self
pub fn set_on_update(self, on_update: Option<FKOnAction>) -> Self
pub fn set_deferrable(self, deferrable: bool) -> Self
Trait Implementations§
Source§impl Clone for ForeignKey
impl Clone for ForeignKey
Source§fn clone(&self) -> ForeignKey
fn clone(&self) -> ForeignKey
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 ForeignKey
impl Debug for ForeignKey
Source§impl PartialEq for ForeignKey
impl PartialEq for ForeignKey
impl Eq for ForeignKey
impl StructuralPartialEq for ForeignKey
Auto Trait Implementations§
impl Freeze for ForeignKey
impl RefUnwindSafe for ForeignKey
impl Send for ForeignKey
impl Sync for ForeignKey
impl Unpin for ForeignKey
impl UnwindSafe for ForeignKey
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