pub trait PreparedExt {
// Provided methods
fn load<'e, Params, E: PgExecutor<'e>>(
&self,
executor: E,
params: Params,
) -> impl Future<Output = Result<Vec<<Self as PreparedQuery<Params>>::Output>>>
where Self: PreparedQuery<Params> { ... }
fn load_one<'e, Params, E: PgExecutor<'e>>(
&self,
executor: E,
params: Params,
) -> impl Future<Output = Result<Option<<Self as PreparedQuery<Params>>::Output>>>
where Self: PreparedQuery<Params> { ... }
fn stream<'e, Params, E: PgExecutor<'e>>(
&self,
executor: E,
params: Params,
) -> Result<impl Stream<Item = Result<<Self as PreparedQuery<Params>>::Output>> + Send + Unpin + 'e>
where Self: PreparedQuery<Params>,
<Self as PreparedQuery<Params>>::Output: Send + 'e { ... }
}Expand description
The bound is on the method, and the impls are per-builder, for the two
reasons LoadExt explains.
Provided Methods§
fn load<'e, Params, E: PgExecutor<'e>>(
&self,
executor: E,
params: Params,
) -> impl Future<Output = Result<Vec<<Self as PreparedQuery<Params>>::Output>>>where
Self: PreparedQuery<Params>,
fn load_one<'e, Params, E: PgExecutor<'e>>(
&self,
executor: E,
params: Params,
) -> impl Future<Output = Result<Option<<Self as PreparedQuery<Params>>::Output>>>where
Self: PreparedQuery<Params>,
Sourcefn stream<'e, Params, E: PgExecutor<'e>>(
&self,
executor: E,
params: Params,
) -> Result<impl Stream<Item = Result<<Self as PreparedQuery<Params>>::Output>> + Send + Unpin + 'e>
fn stream<'e, Params, E: PgExecutor<'e>>( &self, executor: E, params: Params, ) -> Result<impl Stream<Item = Result<<Self as PreparedQuery<Params>>::Output>> + Send + Unpin + 'e>
The rows one at a time, as LoadExt::stream gives them — with the
Params that arrive at the call, which is what a reusable export
query wants.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".