macro_rules! impl_preloadable_leaf {
($ty:ty) => { ... };
}Expand description
Implement Preloadable for a hand-written model as a leaf association
target.
#[model] implements Preloadable automatically. Use this macro for
manually-defined models (those not using #[model]) that need to appear as
the target of a #[belongs_to] / #[has_one] / #[has_many] on another
model. A leaf target loads no associations of its own (its Spec is
NoPreload), so it can be preloaded and wrapped in Preloaded but not
nested into.
The type must implement diesel::Queryable/Selectable for its table.
ⓘ
autumn_web::impl_preloadable_leaf!(User);