pub struct AsyncPreparedQueryStream<'a> { /* private fields */ }Expand description
Streaming iterator for prepared-statement results without materializing all rows (async).
Holding an AsyncPreparedQueryStream keeps the underlying connection
locked via a MutexGuard. Dropping the stream before fully iterating
triggers a best-effort server-side cancel and marks the connection
desynchronized — same Drop semantics as
AsyncQueryStream.
Implementations§
Source§impl<'a> AsyncPreparedQueryStream<'a>
impl<'a> AsyncPreparedQueryStream<'a>
Sourcepub fn schema(&self) -> &[Column]
pub fn schema(&self) -> &[Column]
Returns the result schema (column metadata). Always available — the columns were captured at prepare time.
Sourcepub async fn next_chunk(&mut self) -> Result<Option<Vec<StreamRow>>>
pub async fn next_chunk(&mut self) -> Result<Option<Vec<StreamRow>>>
Retrieves the next chunk of rows (up to chunk_size).
§Errors
- Returns
Error(I/O) /Error(closed) if the async transport fails while awaiting the next protocol message. - Returns
Error(server) when the server sends anErrorResponsepartway through the result stream.
Trait Implementations§
Source§impl Debug for AsyncPreparedQueryStream<'_>
impl Debug for AsyncPreparedQueryStream<'_>
Source§impl Drop for AsyncPreparedQueryStream<'_>
impl Drop for AsyncPreparedQueryStream<'_>
Auto Trait Implementations§
impl<'a> Freeze for AsyncPreparedQueryStream<'a>
impl<'a> !RefUnwindSafe for AsyncPreparedQueryStream<'a>
impl<'a> Send for AsyncPreparedQueryStream<'a>
impl<'a> Sync for AsyncPreparedQueryStream<'a>
impl<'a> Unpin for AsyncPreparedQueryStream<'a>
impl<'a> UnsafeUnpin for AsyncPreparedQueryStream<'a>
impl<'a> !UnwindSafe for AsyncPreparedQueryStream<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request