Trait mysql_async::prelude::UnconsumedQueryResult
[−]
[src]
pub trait UnconsumedQueryResult: InnerQueryResult { type Output: QueryResultOutput; fn collect<R>(self) -> Collect<R, Self> where Self: Sized, R: FromRow { ... } fn collect_all(self) -> CollectAll<Self> where Self: Sized { ... } fn map<F, U>(self, fun: F) -> Map<F, U, Self> where Self: Sized, F: FnMut(Row) -> U { ... } fn reduce<A, F>(self, init: A, fun: F) -> Reduce<A, F, Self> where Self: Sized, F: FnMut(A, Row) -> A { ... } fn for_each<F>(self, fun: F) -> ForEach<F, Self> where Self: Sized, F: FnMut(Row) { ... } fn drop_result(self) -> DropResult<Self> where Self: Sized { ... } }
Query result which was not consumed yet.
Associated Types
type Output: QueryResultOutput
Provided Methods
fn collect<R>(self) -> Collect<R, Self> where Self: Sized, R: FromRow
Returns future which collects result set of this query result.
It is parametrized by R
and internally calls R::from_row(Row)
on each row.
fn collect_all(self) -> CollectAll<Self> where Self: Sized
It returns future that collects all result sets of a multi-result set.
Since only text protocol result could be a multi-result set this method makes sense only for
TextQueryResult
.
fn map<F, U>(self, fun: F) -> Map<F, U, Self> where Self: Sized, F: FnMut(Row) -> U
It returns future that maps every Row
of this query result to U
.
fn reduce<A, F>(self, init: A, fun: F) -> Reduce<A, F, Self> where Self: Sized, F: FnMut(A, Row) -> A
It returns future that reduce rows of this query result to an instance of A
.
fn for_each<F>(self, fun: F) -> ForEach<F, Self> where Self: Sized, F: FnMut(Row)
It returns future that applies F
to every Row
of this query result.
fn drop_result(self) -> DropResult<Self> where Self: Sized
It returns future that drops result and resolves to wrapped Conn
on Stmt
.
Implementors
impl UnconsumedQueryResult for TextQueryResult
impl UnconsumedQueryResult for BinQueryResult
impl UnconsumedQueryResult for TransBinQueryResult
impl UnconsumedQueryResult for TransTextQueryResult