pub struct ForeignKeyField {
pub source: FieldId,
pub target: FieldId,
}Expand description
One column-pair within a ForeignKey.
Maps a single field on the source (owning) model to the corresponding field on the target (referenced) model.
§Examples
use toasty_core::schema::app::{ForeignKeyField, ModelId};
let fkf = ForeignKeyField {
source: ModelId(0).field(2),
target: ModelId(1).field(0),
};Fields§
§source: FieldIdThe field on the source model that stores the foreign key value.
target: FieldIdThe field on the target model that this foreign key references.
Implementations§
Trait Implementations§
Source§impl Clone for ForeignKeyField
impl Clone for ForeignKeyField
Source§fn clone(&self) -> ForeignKeyField
fn clone(&self) -> ForeignKeyField
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 moreAuto Trait Implementations§
impl Freeze for ForeignKeyField
impl RefUnwindSafe for ForeignKeyField
impl Send for ForeignKeyField
impl Sync for ForeignKeyField
impl Unpin for ForeignKeyField
impl UnwindSafe for ForeignKeyField
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