pub type Loader<T> = Arc<dyn for<'a> Fn(&'a dyn Executor, &'a mut Vec<T>) -> ExecFuture<'a, Result<(), ExecError>> + Send + Sync>;Expand description
The then-load payload, pinned: runs after the rows are mapped, with the
caller’s executor and the decoded models, so a second query can be
keyed by the first’s keys and its results attached to the rel fields.
Deliberately typed over the model rather than reusing keelson-exec’s
row-level ExecLoader: a then-loader’s whole job is to mutate decoded
structs (post.rel.user = …), which &[Row] cannot express. ExecLoader
remains the payload for row-level extensions; model queries never use it.
Aliased Type§
pub struct Loader<T> { /* private fields */ }Trait Implementations§
Source§impl<T> IntoLoader<T> for Loader<T>
impl<T> IntoLoader<T> for Loader<T>
Source§fn into_loader(self) -> Loader<T>
fn into_loader(self) -> Loader<T>
The loader payload this level runs.