pub struct Query<'a, T = Vec<Row>>(pub String, _, _);Expand description
A struct for storing a complete query along with parameters and output type.
Depending on the output type, Executable is implemented differently
to allow for easy parsing.
Tuple Fields§
§0: StringImplementations§
Trait Implementations§
source§impl<'a, T> Executable for Query<'a, Option<T>>where
T: TryFrom<Row, Error = Error> + Send + Sync,
impl<'a, T> Executable for Query<'a, Option<T>>where T: TryFrom<Row, Error = Error> + Send + Sync,
source§impl<'a, T> Executable for Query<'a, Vec<T>>where
T: TryFrom<Row, Error = Error> + Send + Sync,
impl<'a, T> Executable for Query<'a, Vec<T>>where T: TryFrom<Row, Error = Error> + Send + Sync,
source§impl<'a> Executable for Query<'a, u64>
impl<'a> Executable for Query<'a, u64>
source§impl<'a, T> IntoFuture for Query<'a, T>where
Query<'a, T>: Executable<Output = T>,
T: Sync + Send + 'a,
impl<'a, T> IntoFuture for Query<'a, T>where Query<'a, T>: Executable<Output = T>, T: Sync + Send + 'a,
Implement IntoFuture for Query so that any executable Query
may be executed by calling .await.
§type IntoFuture = Pin<Box<dyn Future<Output = <Query<'a, T> as IntoFuture>::Output> + 'a, Global>>
type IntoFuture = Pin<Box<dyn Future<Output = <Query<'a, T> as IntoFuture>::Output> + 'a, Global>>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'a, T = Vec<Row, Global>> !RefUnwindSafe for Query<'a, T>
impl<'a, T> Send for Query<'a, T>where T: Send,
impl<'a, T> Sync for Query<'a, T>where T: Sync,
impl<'a, T> Unpin for Query<'a, T>where T: Unpin,
impl<'a, T = Vec<Row, Global>> !UnwindSafe for Query<'a, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more