pub struct ResolvedRelation {
pub name: Option<String>,
pub related_model: String,
pub relation_type: RelationType,
pub fields: Vec<String>,
pub references: Vec<String>,
pub on_delete: ReferentialAction,
pub on_update: ReferentialAction,
}Expand description
A resolved relation between two models.
name carries the optional disambiguator from
@relation("Name", ...) (or name: "Name"). When two fields on
the same model both relate to the same target, name must be
set on both sides for the validator to pair them correctly.
Fields§
§name: Option<String>§relation_type: RelationType§fields: Vec<String>§references: Vec<String>§on_delete: ReferentialAction§on_update: ReferentialActionTrait Implementations§
Source§impl Clone for ResolvedRelation
impl Clone for ResolvedRelation
Source§fn clone(&self) -> ResolvedRelation
fn clone(&self) -> ResolvedRelation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ResolvedRelation
impl RefUnwindSafe for ResolvedRelation
impl Send for ResolvedRelation
impl Sync for ResolvedRelation
impl Unpin for ResolvedRelation
impl UnsafeUnpin for ResolvedRelation
impl UnwindSafe for ResolvedRelation
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