pub struct Has {
pub target: ModelId,
pub expr_ty: Type,
pub cardinality: Cardinality,
pub pair_id: FieldId,
}Expand description
The inverse side of a relationship.
A Has field on model A reaches an associated model B through a paired
BelongsTo field on B that holds the foreign key. Its cardinality records
whether the field represents “A has many Bs” or “A has one B”.
Fields§
§target: ModelIdThe ModelId of the associated (target) model.
expr_ty: TypeThe expression type this field evaluates to from the application’s perspective.
cardinality: CardinalityWhether this relation is one-to-many or one-to-one.
pair_id: FieldIdThe paired BelongsTo field on the target model.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Has
impl RefUnwindSafe for Has
impl Send for Has
impl Sync for Has
impl Unpin for Has
impl UnsafeUnpin for Has
impl UnwindSafe for Has
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