Skip to main content

WithEagerLoad

Trait WithEagerLoad 

Source
pub trait WithEagerLoad<E>: Sized
where E: Entity,
{ // Required methods fn with<R>(self) -> EagerQuery<E, R> where R: Entity + Clone + for<'r> FromRow<'r, PgRow> + Send + Unpin; fn with_many<R>(self) -> EagerManyQuery<E, R> where R: Entity + Clone + for<'r> FromRow<'r, PgRow> + Send + Unpin; }
Expand description

Extension trait for adding eager loading to query builders

Required Methods§

Source

fn with<R>(self) -> EagerQuery<E, R>
where R: Entity + Clone + for<'r> FromRow<'r, PgRow> + Send + Unpin,

Eager load a BelongsTo relationship

Source

fn with_many<R>(self) -> EagerManyQuery<E, R>
where R: Entity + Clone + for<'r> FromRow<'r, PgRow> + Send + Unpin,

Eager load a HasMany relationship

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§