Skip to main content

ProjectedQueryOutcome

Enum ProjectedQueryOutcome 

Source
pub enum ProjectedQueryOutcome {
    Ready {
        fields: Vec<String>,
        primary_key_fields: Vec<String>,
        rows: Vec<ProjectedReadyRow>,
        frontier: ProjectionFrontier,
        head: ProjectionFrontier,
        commit_token: Option<CommitToken>,
    },
    ReadyAggregates {
        group_key_fields: Vec<String>,
        aggregates: Vec<ProjectedAggregate>,
        groups: Vec<ProjectedAggregateGroup>,
        frontier: ProjectionFrontier,
        head: ProjectionFrontier,
        commit_token: Option<CommitToken>,
    },
    Lagging {
        required: ProjectionFrontier,
        current: ProjectionFrontier,
        head: ProjectionFrontier,
        lag_sequences: Option<u64>,
        retry_after: Option<Duration>,
    },
    Building {
        applied_through: ProjectionFrontier,
        head: ProjectionFrontier,
    },
    Rebuilding {
        reason: ProjectedRebuildingReason,
        progress_applied: u64,
        progress_total: u64,
    },
    Degraded {
        reason: ProjectedDegradedReason,
        current: ProjectionFrontier,
    },
    Invalid {
        expected_fingerprint: Vec<u8>,
        found_fingerprint: Vec<u8>,
    },
}
Expand description

Typed projected-query outcome mirroring the wire oneof arms.

Variants§

§

Ready

Published snapshot under the requested freshness policy.

The select/primary-key split depends on the requested encoding, because the row-oriented wire arm carries no separate primary-key vector:

  • ProjectedResponseEncoding::Packed — fields are exactly the selected projected fields, primary_key_fields are the entity primary-key components, and each row’s cells/primary_key align with them respectively.
  • ProjectedResponseEncoding::Row — primary_key_fields is always empty and every row’s primary_key is empty. Primary-key names that were not selected are appended by the server to fields, so they arrive as trailing cells. Request Packed when the split matters.

Fields

§fields: Vec<String>

Projected field names in wire order for each row’s cells.

Under Row encoding this also carries non-selected primary-key names appended after the selected fields.

§primary_key_fields: Vec<String>

Entity primary-key field names aligned with each row’s primary_key.

Always empty under Row encoding (see the variant documentation).

§rows: Vec<ProjectedReadyRow>

Matching rows (primary_key empty under Row encoding).

§frontier: ProjectionFrontier

Served projection frontier.

§head: ProjectionFrontier

Application head known at serve time.

§commit_token: Option<CommitToken>

Commit token corresponding to the served frontier when sequenced.

§

ReadyAggregates

Published snapshot answering an aggregate or grouped request.

Answers every request carrying at least one ProjectedAggregate, grouped or not; a whole-set aggregate arrives as exactly one group with an empty keys list. The requested ProjectedResponseEncoding does not apply to this shape.

groups is in the server’s deterministic canonical value order over the group keys (or the requested group-key order with canonical ascending tie-breaking).

Fields

§group_key_fields: Vec<String>

Group key field names; column order for every group’s keys.

§aggregates: Vec<ProjectedAggregate>

The request’s aggregate functions echoed back; column order for every group’s values.

§groups: Vec<ProjectedAggregateGroup>

Groups in server order.

§frontier: ProjectionFrontier

Served projection frontier.

§head: ProjectionFrontier

Application head known at serve time.

§commit_token: Option<CommitToken>

Commit token corresponding to the served frontier when sequenced.

§

Lagging

Freshness policy not yet satisfied.

Fields

§required: ProjectionFrontier

Required frontier derived from the causal token or bounded policy.

§current: ProjectionFrontier

Current projection frontier.

§head: ProjectionFrontier

Application head.

§lag_sequences: Option<u64>

Sequence distance backlog when both are sequenced.

§retry_after: Option<Duration>

Optional retry hint.

§

Building

Catch-up before first publication.

Fields

§applied_through: ProjectionFrontier

Processed position during catch-up.

§head: ProjectionFrontier

Known application head.

§

Rebuilding

Rebuild in progress.

Fields

§reason: ProjectedRebuildingReason

Closed reason code.

§progress_applied: u64

Progress numerator.

§progress_total: u64

Progress denominator (0 = unknown).

§

Degraded

Degraded health while still identified.

Fields

§reason: ProjectedDegradedReason

Closed reason code.

§current: ProjectionFrontier

Current frontier while degraded.

§

Invalid

Durable definition fingerprint mismatch.

Fields

§expected_fingerprint: Vec<u8>

Fingerprint expected by the registered definition.

§found_fingerprint: Vec<u8>

Fingerprint found in durable state.

Trait Implementations§

Source§

impl Clone for ProjectedQueryOutcome

Source§

fn clone(&self) -> ProjectedQueryOutcome

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProjectedQueryOutcome

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ProjectedQueryOutcome

Source§

impl PartialEq for ProjectedQueryOutcome

Source§

fn eq(&self, other: &ProjectedQueryOutcome) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ProjectedQueryOutcome

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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