Struct tiberius::stmt::StmtStream
[−]
[src]
pub struct StmtStream<I: BoxableIo, R: StmtResult<I>> { /* fields omitted */ }
A future which handles the execution of a prepared statement and translates it
into the wished result (e.g. QueryStream
)
Methods
impl<I: BoxableIo, R: StmtResult<I>> StmtStream<I, R>
[src]
fn new(
conn: SqlConnection<I>,
stmt: Statement,
meta: Option<Arc<TokenColMetaData>>,
params: &[&ToSql]
) -> Self
[src]
conn: SqlConnection<I>,
stmt: Statement,
meta: Option<Arc<TokenColMetaData>>,
params: &[&ToSql]
) -> Self
fn error(self, err: TdsError) -> Self
[src]
Trait Implementations
impl<I: BoxableIo, R: StmtResult<I>> StateStream for StmtStream<I, R>
[src]
type Item = R::Result
The items being streamed.
type State = SqlConnection<I>
The state returned when streaming completes.
type Error = TdsError
The error returned.
fn poll(&mut self) -> Poll<StreamEvent<Self::Item, Self::State>, Self::Error>
[src]
Similar to Stream::poll
. Read more
fn boxed(
self
) -> Box<StateStream<State = Self::State, Item = Self::Item, Error = Self::Error> + 'static + Send> where
Self: Send + 'static,
[src]
self
) -> Box<StateStream<State = Self::State, Item = Self::Item, Error = Self::Error> + 'static + Send> where
Self: Send + 'static,
Returns this stream as a boxed trait object.
fn into_future(self) -> IntoFuture<Self>
[src]
Returns a future which yields the next element of the stream.
fn into_stream(self) -> IntoStream<Self>
[src]
Returns a normal Stream
which yields the elements of this stream and discards the state.
fn map<F, B>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> B,
[src]
F: FnMut(Self::Item) -> B,
Returns a stream which applies a transform to items of this stream.
fn map_err<F, B>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> B,
[src]
F: FnMut(Self::Error) -> B,
Returns a stream which applies a transform to errors of this stream.
fn map_state<F, B>(self, f: F) -> MapState<Self, F> where
F: FnOnce(Self::State) -> B,
[src]
F: FnOnce(Self::State) -> B,
Returns a stream which applies a transform to the state of this stream.
fn filter<F>(self, f: F) -> Filter<Self, F> where
F: FnMut(&Self::Item) -> bool,
[src]
F: FnMut(&Self::Item) -> bool,
Returns a stream which filters items of this stream by a predicate.
fn filter_map<F, B>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Option<B>,
[src]
F: FnMut(Self::Item) -> Option<B>,
Returns a stream which filters and transforms items of this stream by a predicate.
fn then<F, U>(self, f: F) -> Then<Self, F, U> where
F: FnMut(Result<Self::Item, Self::Error>) -> U,
U: IntoFuture,
Self::Error: From<<U as IntoFuture>::Error>,
[src]
F: FnMut(Result<Self::Item, Self::Error>) -> U,
U: IntoFuture,
Self::Error: From<<U as IntoFuture>::Error>,
Returns a stream which transforms results of this stream into a new future.
fn and_then<F, U>(self, f: F) -> AndThen<Self, F, U> where
F: FnMut(Self::Item) -> U,
U: IntoFuture,
Self::Error: From<<U as IntoFuture>::Error>,
[src]
F: FnMut(Self::Item) -> U,
U: IntoFuture,
Self::Error: From<<U as IntoFuture>::Error>,
Returns a stream which transforms items of this stream into a new future.
fn and_then_state<F, U>(self, f: F) -> AndThenState<Self, F, U> where
F: FnMut(Self::State) -> U,
U: IntoFuture,
Self::Error: From<<U as IntoFuture>::Error>,
[src]
F: FnMut(Self::State) -> U,
U: IntoFuture,
Self::Error: From<<U as IntoFuture>::Error>,
Returns a stream which transforms the state of this stream into a new future.
fn or_else<F, U>(self, f: F) -> OrElse<Self, F, U> where
F: FnMut(Self::Error) -> U,
U: IntoFuture<Item = Self::Item>,
[src]
F: FnMut(Self::Error) -> U,
U: IntoFuture<Item = Self::Item>,
Returns a stream which transforms errors of this stream into a new future.
fn collect(self) -> Collect<Self>
[src]
Returns a stream which collects all items of this stream into a Vec
, returning it along with the stream's state. Read more
fn fold<T, F, Fut, G, Fut2>(
self,
init: T,
next: F,
done: G
) -> Fold<Self, T, F, Fut, G, Fut2> where
F: FnMut(T, Self::Item) -> Fut,
Fut: IntoFuture<Item = T>,
Fut2: IntoFuture<Item = T>,
G: FnOnce(T, Self::State) -> Fut2,
Self::Error: From<<Fut as IntoFuture>::Error>,
Self::Error: From<<Fut2 as IntoFuture>::Error>,
[src]
self,
init: T,
next: F,
done: G
) -> Fold<Self, T, F, Fut, G, Fut2> where
F: FnMut(T, Self::Item) -> Fut,
Fut: IntoFuture<Item = T>,
Fut2: IntoFuture<Item = T>,
G: FnOnce(T, Self::State) -> Fut2,
Self::Error: From<<Fut as IntoFuture>::Error>,
Self::Error: From<<Fut2 as IntoFuture>::Error>,
Applies a fold across all elements of this stream and its state.
fn skip_while<P, R>(self, pred: P) -> SkipWhile<Self, P, R> where
P: FnMut(&Self::Item) -> R,
R: IntoFuture<Item = bool, Error = Self::Error>,
[src]
P: FnMut(&Self::Item) -> R,
R: IntoFuture<Item = bool, Error = Self::Error>,
Returns a stream which skips initial elements matching a predicate.
fn for_each<F>(self, f: F) -> ForEach<Self, F> where
F: FnMut(Self::Item) -> Result<(), Self::Error>,
[src]
F: FnMut(Self::Item) -> Result<(), Self::Error>,
Returns a future which applies a closure to each item of this stream.
fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe,
[src]
Self: UnwindSafe,
Returns a future which catches panics generated by this stream.
fn buffered(self, amt: usize) -> Buffered<Self> where
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error == Self::Error,
[src]
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error == Self::Error,
Returns a stream which buffers a fixed number of items of this stream.
fn buffered_unordered(self, amt: usize) -> BufferedUnordered<Self> where
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error == Self::Error,
[src]
Self::Item: IntoFuture,
<Self::Item as IntoFuture>::Error == Self::Error,
Returns a stream which buffers a fixed number of items of this stream, returning them out of order as they become ready. Read more
impl<I: BoxableIo, R: StmtResult<I>> ResultStreamExt<I> for StmtStream<I, R>
[src]
fn for_each_row<F>(self, f: F) -> ForEachRow<I, Self, F> where
Self: Sized + StateStream<Item = QueryStream<I>, Error = <QueryStream<I> as Stream>::Error>,
F: FnMut(<QueryStream<I> as Stream>::Item) -> Result<(), TdsError>,
[src]
Self: Sized + StateStream<Item = QueryStream<I>, Error = <QueryStream<I> as Stream>::Error>,
F: FnMut(<QueryStream<I> as Stream>::Item) -> Result<(), TdsError>,
Only expect 1 result set (e.g. if you're only executing one query) and execute a given closure for the results of the first result set Read more
fn single(self) -> SingleResultSet<I, Self> where
Self: Sized + StateStream<Item = ExecFuture<I>, Error = <ExecFuture<I> as Future>::Error>,
[src]
Self: Sized + StateStream<Item = ExecFuture<I>, Error = <ExecFuture<I> as Future>::Error>,
Expect 1 resultset and unpacks the single underlying ExecFuture # Panics This will panic if there is more than 1 resultset Read more