pub struct Relation {
pub name: String,
pub from: RelationEnd,
pub to: RelationEnd,
pub cardinality: RelationCardinality,
pub on_delete: Option<RelationAction>,
pub enforce: Option<bool>,
}Expand description
A declared link between two tables. enforce: true is checked at put/patch
(Database::put_checked/patch_checked) and on_delete at delete
(Database::delete_checked) — both opt-in per relation; a relation naming neither is still
reported by crate::catalog::check_integrity and Database::relations, but nothing about a
write or delete checks it.
Fields§
§name: String§from: RelationEnd§to: RelationEnd§cardinality: RelationCardinality§on_delete: Option<RelationAction>§enforce: Option<bool>Trait Implementations§
impl StructuralPartialEq for Relation
Auto Trait Implementations§
impl Freeze for Relation
impl RefUnwindSafe for Relation
impl Send for Relation
impl Sync for Relation
impl Unpin for Relation
impl UnsafeUnpin for Relation
impl UnwindSafe for Relation
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