pub struct ForeignKey {
pub child_table: String,
pub child_columns: Vec<String>,
pub parent_table: String,
pub parent_columns: Vec<String>,
pub on_delete: Option<String>,
}Expand description
A foreign-key edge in a schema, returned by
Connection::list_foreign_keys. The columns lists are aligned:
child_columns[i] references parent_columns[i].
Fields§
§child_table: String§child_columns: Vec<String>§parent_table: String§parent_columns: Vec<String>§on_delete: Option<String>Informational only: e.g. "CASCADE", "SET NULL", "NO ACTION".
None when the backend doesn’t expose this (or it isn’t set).
Trait Implementations§
Source§impl Clone for ForeignKey
impl Clone for ForeignKey
Source§fn clone(&self) -> ForeignKey
fn clone(&self) -> ForeignKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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
impl Eq for ForeignKey
Source§impl PartialEq for ForeignKey
impl PartialEq for ForeignKey
Source§fn eq(&self, other: &ForeignKey) -> bool
fn eq(&self, other: &ForeignKey) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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
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§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.