pub struct RelationshipDef { /* private fields */ }Implementations§
Source§impl RelationshipDef
impl RelationshipDef
pub fn new( field: impl Into<String>, target_table: impl Into<String>, target_field: impl Into<String>, cardinality: RelationshipCardinality, ) -> Self
pub fn with_back_reference(self, back_reference: impl Into<String>) -> Self
pub fn with_columns( self, local_columns: Vec<String>, remote_columns: Vec<String>, ) -> Self
pub fn with_direction(self, direction: RelationshipDirection) -> Self
pub fn uselist(self, uselist: bool) -> Self
pub fn nullable(self, nullable: bool) -> Self
pub fn secondary_table(self, secondary_table: impl Into<String>) -> Self
pub fn cascade(self, cascade: Vec<CascadeAction>) -> Self
pub fn loader_strategy(self, loader_strategy: LoaderStrategy) -> Self
pub fn field(&self) -> &str
pub fn target_table(&self) -> &str
pub fn target_field(&self) -> &str
pub fn cardinality(&self) -> &RelationshipCardinality
pub fn back_reference(&self) -> Option<&str>
pub fn local_columns(&self) -> &[String]
pub fn remote_columns(&self) -> &[String]
pub fn direction(&self) -> &RelationshipDirection
pub fn is_uselist(&self) -> bool
pub fn is_nullable(&self) -> bool
pub fn secondary_table_name(&self) -> Option<&str>
pub fn cascade_actions(&self) -> &[CascadeAction]
pub fn loader_strategy_ref(&self) -> &LoaderStrategy
Trait Implementations§
Source§impl Clone for RelationshipDef
impl Clone for RelationshipDef
Source§impl Debug for RelationshipDef
impl Debug for RelationshipDef
impl Eq for RelationshipDef
Source§impl PartialEq for RelationshipDef
impl PartialEq for RelationshipDef
impl StructuralPartialEq for RelationshipDef
Auto Trait Implementations§
impl Freeze for RelationshipDef
impl RefUnwindSafe for RelationshipDef
impl Send for RelationshipDef
impl Sync for RelationshipDef
impl Unpin for RelationshipDef
impl UnsafeUnpin for RelationshipDef
impl UnwindSafe for RelationshipDef
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