pub struct GeneratedQueryPageStream<'a, Q> { /* private fields */ }Expand description
Bounded multi-page continuation stream over a generated query (ADR-0339).
Implementations§
Source§impl<'a, Q: GeneratedQuery + Clone> GeneratedQueryPageStream<'a, Q>
impl<'a, Q: GeneratedQuery + Clone> GeneratedQueryPageStream<'a, Q>
Sourcepub fn with_max_pages(self, max_pages: u32) -> Self
pub fn with_max_pages(self, max_pages: u32) -> Self
Bounds the maximum number of pages this stream will yield (clamped to 1..=MAX_STREAMED_QUERY_PAGES).
Sourcepub const fn pages_emitted(&self) -> u32
pub const fn pages_emitted(&self) -> u32
Number of pages yielded so far.
Sourcepub const fn pinned_application_head(&self) -> Option<u64>
pub const fn pinned_application_head(&self) -> Option<u64>
Pinned snapshot application_head established by the first page.
Sourcepub async fn next_page(
&mut self,
) -> Result<Option<TypedQueryResult<Q::Output>>, ApplicationClientError>
pub async fn next_page( &mut self, ) -> Result<Option<TypedQueryResult<Q::Output>>, ApplicationClientError>
Fetches the next bounded typed page in the cursor chain, or Ok(None) when complete.
Sourcepub async fn collect_pages(
self,
) -> Result<Vec<TypedQueryResult<Q::Output>>, ApplicationClientError>
pub async fn collect_pages( self, ) -> Result<Vec<TypedQueryResult<Q::Output>>, ApplicationClientError>
Collects all remaining typed pages up to the configured page bound.
Auto Trait Implementations§
impl<'a, Q> !RefUnwindSafe for GeneratedQueryPageStream<'a, Q>
impl<'a, Q> !UnwindSafe for GeneratedQueryPageStream<'a, Q>
impl<'a, Q> Freeze for GeneratedQueryPageStream<'a, Q>where
Q: Freeze,
impl<'a, Q> Send for GeneratedQueryPageStream<'a, Q>where
Q: Send,
impl<'a, Q> Sync for GeneratedQueryPageStream<'a, Q>where
Q: Sync,
impl<'a, Q> Unpin for GeneratedQueryPageStream<'a, Q>where
Q: Unpin,
impl<'a, Q> UnsafeUnpin for GeneratedQueryPageStream<'a, Q>where
Q: UnsafeUnpin,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].