pub struct RelationDef {
pub field: &'static str,
pub target_table: &'static str,
pub inverse: &'static str,
pub delete: DeleteRule,
pub ordered: Option<&'static str>,
pub join: Option<&'static str>,
}Expand description
One declared relation, as the derive records it on the parent (Many) side.
Fields§
§field: &'static strThe Many field’s name on the declaring model.
target_table: &'static strThe target model’s table.
inverse: &'static strTo-one/to-many: the target’s foreign-key field. Join relations leave it empty.
delete: DeleteRule§ordered: Option<&'static str>The target’s order field (REAL) for an ordered to-many.
join: Option<&'static str>A join table name: the many-to-many form.
Trait Implementations§
Source§impl Clone for RelationDef
impl Clone for RelationDef
impl Copy for RelationDef
Auto Trait Implementations§
impl Forget for RelationDef
impl Freeze for RelationDef
impl RefUnwindSafe for RelationDef
impl Send for RelationDef
impl Sync for RelationDef
impl Unpin for RelationDef
impl UnsafeUnpin for RelationDef
impl UnwindSafe for RelationDef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more