pub struct CandidForeignKeyDef {
pub local_column: String,
pub foreign_table: String,
pub foreign_column: String,
}Expand description
Serializable foreign key definition for API boundaries.
This type mirrors ForeignKeyDef but uses owned String fields instead
of &'static str, making it suitable for serialization across API boundaries.
Fields§
§local_column: StringName of the local column that holds the foreign key (e.g., “user_id”).
foreign_table: StringName of the foreign table (e.g., “users”).
foreign_column: StringName of the foreign column that the FK points to (e.g., “id”).
Trait Implementations§
Source§impl Clone for CandidForeignKeyDef
impl Clone for CandidForeignKeyDef
Source§fn clone(&self) -> CandidForeignKeyDef
fn clone(&self) -> CandidForeignKeyDef
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 CandidForeignKeyDef
impl Debug for CandidForeignKeyDef
Source§impl<'de> Deserialize<'de> for CandidForeignKeyDef
impl<'de> Deserialize<'de> for CandidForeignKeyDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ForeignKeyDef> for CandidForeignKeyDef
impl From<ForeignKeyDef> for CandidForeignKeyDef
Source§fn from(def: ForeignKeyDef) -> Self
fn from(def: ForeignKeyDef) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CandidForeignKeyDef
impl PartialEq for CandidForeignKeyDef
Source§impl Serialize for CandidForeignKeyDef
impl Serialize for CandidForeignKeyDef
impl Eq for CandidForeignKeyDef
impl StructuralPartialEq for CandidForeignKeyDef
Auto Trait Implementations§
impl Freeze for CandidForeignKeyDef
impl RefUnwindSafe for CandidForeignKeyDef
impl Send for CandidForeignKeyDef
impl Sync for CandidForeignKeyDef
impl Unpin for CandidForeignKeyDef
impl UnsafeUnpin for CandidForeignKeyDef
impl UnwindSafe for CandidForeignKeyDef
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