Skip to main content

PrefetchRef

Trait PrefetchRef 

Source
pub trait PrefetchRef<M, R> {
    // Required method
    fn prefetch_kind(&self) -> PrefetchKind<'_>;
}
Expand description

Accepted by prefetch_related: a reverse foreign key (Comment::POST_ID, a post_id: ForeignKey<Post> field on Comment), a M2M field (Article::TAGS), or &str naming the reverse FK column (then name the model with ::<R>).

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<M, R> PrefetchRef<M, R> for &str

Implementors§

Source§

impl<M, R> PrefetchRef<M, R> for ManyToManyField<M, R>

Source§

impl<M: Model, R> PrefetchRef<M, R> for Column<R, ForeignKey<M>>