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 CandidType for CandidForeignKeyDef
impl CandidType for CandidForeignKeyDef
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<CandidForeignKeyDef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CandidForeignKeyDef, <__D as Deserializer<'de>>::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) -> CandidForeignKeyDef
fn from(def: ForeignKeyDef) -> CandidForeignKeyDef
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
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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