Skip to main content

GeneratedQueryPageStream

Struct GeneratedQueryPageStream 

Source
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>

Source

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).

Source

pub const fn pages_emitted(&self) -> u32

Number of pages yielded so far.

Source

pub const fn pinned_application_head(&self) -> Option<u64>

Pinned snapshot application_head established by the first page.

Source

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.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

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].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more