pub struct ForeignKeyState {
pub target: String,
pub on_delete: Option<String>,
}Expand description
An owned foreign-key definition in a migration state.
Fields§
§target: String§on_delete: Option<String>Implementations§
Source§impl ForeignKeyState
impl ForeignKeyState
Sourcepub fn target_parts(&self) -> Option<(&str, &str)>
pub fn target_parts(&self) -> Option<(&str, &str)>
Returns the structured target stored in the migration snapshot.
A malformed legacy target returns None and is rejected by state
validation before a migration can be planned.
Trait Implementations§
Source§impl Clone for ForeignKeyState
impl Clone for ForeignKeyState
Source§impl Debug for ForeignKeyState
impl Debug for ForeignKeyState
impl Eq for ForeignKeyState
Source§impl From<&ForeignKey> for ForeignKeyState
impl From<&ForeignKey> for ForeignKeyState
Source§fn from(foreign_key: &ForeignKey) -> Self
fn from(foreign_key: &ForeignKey) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ForeignKeyState
impl PartialEq for ForeignKeyState
impl StructuralPartialEq for ForeignKeyState
Auto Trait Implementations§
impl Forget for ForeignKeyState
impl Freeze for ForeignKeyState
impl Move for ForeignKeyState
impl RefUnwindSafe for ForeignKeyState
impl Send for ForeignKeyState
impl Sync for ForeignKeyState
impl Unpin for ForeignKeyState
impl UnsafeUnpin for ForeignKeyState
impl UnwindSafe for ForeignKeyState
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