pub struct ModelLink {
pub name: String,
pub model: String,
pub rel: ModelRelationship,
pub limit: Option<usize>,
}
Expand description
Mechanism for linking two models together to establish a relationship between them.
Fields§
§name: String
Name of the link, used as field name when specifying fields to include for a template.
model: String
Name of the other model to link.
rel: ModelRelationship
Kind of relationship this link establishes.
limit: Option<usize>
Limit on number of records that can be stored for this reference. If set to 0 no limit is placed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelLink
impl<'de> Deserialize<'de> for ModelLink
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelLink
impl RefUnwindSafe for ModelLink
impl Send for ModelLink
impl Sync for ModelLink
impl Unpin for ModelLink
impl UnwindSafe for ModelLink
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