pub struct RelationBuilder<E, R> where
E: EntityTrait,
R: EntityTrait, { /* private fields */ }
Expand description
Defines a helper to build a relation
Implementations
impl<E, R> RelationBuilder<E, R> where
E: EntityTrait,
R: EntityTrait,
impl<E, R> RelationBuilder<E, R> where
E: EntityTrait,
R: EntityTrait,
pub fn from<T>(self, identifier: T) -> RelationBuilder<E, R> where
T: IdentityOf<E>,
pub fn from<T>(self, identifier: T) -> RelationBuilder<E, R> where
T: IdentityOf<E>,
Build a relationship from an Entity
pub fn to<T>(self, identifier: T) -> RelationBuilder<E, R> where
T: IdentityOf<R>,
pub fn to<T>(self, identifier: T) -> RelationBuilder<E, R> where
T: IdentityOf<R>,
Build a relationship to an Entity
pub fn on_delete(self, action: ForeignKeyAction) -> RelationBuilder<E, R>
pub fn on_delete(self, action: ForeignKeyAction) -> RelationBuilder<E, R>
An operation to perform on a foreign key when a delete operation occurs
pub fn on_update(self, action: ForeignKeyAction) -> RelationBuilder<E, R>
pub fn on_update(self, action: ForeignKeyAction) -> RelationBuilder<E, R>
An operation to perform on a foreign key when an update operation occurs
pub fn fk_name(self, fk_name: &str) -> RelationBuilder<E, R>
pub fn fk_name(self, fk_name: &str) -> RelationBuilder<E, R>
Set the name of foreign key constraint
Trait Implementations
impl<E, R> Debug for RelationBuilder<E, R> where
E: Debug + EntityTrait,
R: Debug + EntityTrait,
impl<E, R> Debug for RelationBuilder<E, R> where
E: Debug + EntityTrait,
R: Debug + EntityTrait,
impl<E, R> From<RelationBuilder<E, R>> for RelationDef where
E: EntityTrait,
R: EntityTrait,
impl<E, R> From<RelationBuilder<E, R>> for RelationDef where
E: EntityTrait,
R: EntityTrait,
fn from(b: RelationBuilder<E, R>) -> RelationDef
fn from(b: RelationBuilder<E, R>) -> RelationDef
Converts to this type from the input type.
Auto Trait Implementations
impl<E, R> !RefUnwindSafe for RelationBuilder<E, R>
impl<E, R> Send for RelationBuilder<E, R>
impl<E, R> Sync for RelationBuilder<E, R>
impl<E, R> Unpin for RelationBuilder<E, R> where
E: Unpin,
R: Unpin,
impl<E, R> !UnwindSafe for RelationBuilder<E, R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more