pub struct StableApplicationClient { /* private fields */ }Expand description
Application-only client facade.
This type deliberately has no accessor for its kernel client. Stable application code can execute name-addressed commands and exact named queries, but cannot construct raw entity/index requests through this surface.
Implementations§
Source§impl StableApplicationClient
impl StableApplicationClient
Sourcepub async fn connect_verified_tls(
config: &TlsClientConfig,
) -> Result<Self, ClientError>
pub async fn connect_verified_tls( config: &TlsClientConfig, ) -> Result<Self, ClientError>
Connects the application-only facade through mandatory explicit TLS trust and exact peer-name verification.
Sourcepub async fn connect_uri(endpoint: String) -> Result<Self, ClientError>
pub async fn connect_uri(endpoint: String) -> Result<Self, ClientError>
Connects the application facade from one bounded URI without exposing the transport package to application code.
Sourcepub async fn connect(endpoint: Endpoint) -> Result<Self, ClientError>
pub async fn connect(endpoint: Endpoint) -> Result<Self, ClientError>
Connects the application facade over one reusable HTTP/2 channel.
Sourcepub fn from_channel(channel: Channel) -> Self
pub fn from_channel(channel: Channel) -> Self
Constructs the application facade over an existing channel.
Sourcepub fn with_standby_clients(
self,
standby: Vec<Self>,
) -> Result<Self, ApplicationClientError>
pub fn with_standby_clients( self, standby: Vec<Self>, ) -> Result<Self, ApplicationClientError>
Attaches up to 4 standby channels for automatic contract-verified failover when the primary is fenced or unreachable.
Sourcepub fn with_read_replica_clients(
self,
replicas: Vec<Self>,
) -> Result<Self, ApplicationClientError>
pub fn with_read_replica_clients( self, replicas: Vec<Self>, ) -> Result<Self, ApplicationClientError>
Attaches up to 4 follower read-replica channels for eligible read queries with automatic primary fallback.
Sourcepub fn standby_client_count(&self) -> usize
pub fn standby_client_count(&self) -> usize
Returns the number of remaining standby channels configured on this facade.
Sourcepub fn read_replica_client_count(&self) -> usize
pub fn read_replica_client_count(&self) -> usize
Returns the number of read-replica channels configured on this facade.
Sourcepub async fn open_bounded_session(
&mut self,
identity: ApplicationSessionIdentity,
metadata: &CallMetadata,
) -> Result<(), ApplicationClientError>
pub async fn open_bounded_session( &mut self, identity: ApplicationSessionIdentity, metadata: &CallMetadata, ) -> Result<(), ApplicationClientError>
Opens the optional bounded multiplexed application transport against one exact generated application identity. Unary transport remains the default until this explicit operation succeeds.
Sourcepub const fn bounded_session_enabled(&self) -> bool
pub const fn bounded_session_enabled(&self) -> bool
Reports whether this facade explicitly selected the bounded session.
Sourcepub fn close_bounded_session(&mut self)
pub fn close_bounded_session(&mut self)
Explicitly closes the optional bounded session and returns this facade to unary transport. In-flight operations are released under the same uncertainty rules as stream loss.
Sourcepub async fn verify_active_contract(
&mut self,
database: &str,
lineage: &str,
version: u64,
bundle_hash: [u8; 32],
metadata: &CallMetadata,
) -> Result<(), ApplicationClientError>
pub async fn verify_active_contract( &mut self, database: &str, lineage: &str, version: u64, bundle_hash: [u8; 32], metadata: &CallMetadata, ) -> Result<(), ApplicationClientError>
Proves that the authenticated remote database currently exposes the exact contract identity compiled into the application lock.
Sourcepub async fn preflight_application_features(
&mut self,
contract: ApplicationContract,
metadata: &CallMetadata,
) -> Result<ApplicationCatalogPreflight, ApplicationClientError>
pub async fn preflight_application_features( &mut self, contract: ApplicationContract, metadata: &CallMetadata, ) -> Result<ApplicationCatalogPreflight, ApplicationClientError>
Reads and validates the symbolic feature catalog for one exact contract.
This application-only view deliberately omits catalog symbols, numeric identities, raw IR, and capability details. An unavailable feature is explicit and never authorizes a client-side fallback.
Sourcepub async fn inspect_vector_state(
&mut self,
request: VectorStateInspection,
metadata: &CallMetadata,
) -> Result<VectorStateInspectionResult, ApplicationClientError>
pub async fn inspect_vector_state( &mut self, request: VectorStateInspection, metadata: &CallMetadata, ) -> Result<VectorStateInspectionResult, ApplicationClientError>
Inspects one compiler-declared production vector field through the symbolic, policy-filtered application operation.
Sourcepub async fn execute_named_query(
&mut self,
query: NamedQuery,
metadata: &CallMetadata,
) -> Result<NamedQueryResult, ApplicationClientError>
pub async fn execute_named_query( &mut self, query: NamedQuery, metadata: &CallMetadata, ) -> Result<NamedQueryResult, ApplicationClientError>
Executes one exact named module query.
Sourcepub async fn execute_generated_query<Q: GeneratedQuery>(
&mut self,
query: Q,
options: QueryOptions,
metadata: &CallMetadata,
) -> Result<TypedQueryResult<Q::Output>, ApplicationClientError>
pub async fn execute_generated_query<Q: GeneratedQuery>( &mut self, query: Q, options: QueryOptions, metadata: &CallMetadata, ) -> Result<TypedQueryResult<Q::Output>, ApplicationClientError>
Executes and decodes one generated exact named-query shape.
Sourcepub async fn execute_command(
&mut self,
command: ApplicationCommand,
attempts: AttemptBudget,
metadata: &CallMetadata,
) -> Result<ApplicationCommandResult, ApplicationClientError>
pub async fn execute_command( &mut self, command: ApplicationCommand, attempts: AttemptBudget, metadata: &CallMetadata, ) -> Result<ApplicationCommandResult, ApplicationClientError>
Executes one exact symbolic command with bounded uncertainty recovery.
Sourcepub async fn execute_generated_command<C: GeneratedCommand>(
&mut self,
command: &C,
attempts: AttemptBudget,
metadata: &CallMetadata,
) -> Result<TypedCommandResult<C::Outcome>, GeneratedExecutionError>
pub async fn execute_generated_command<C: GeneratedCommand>( &mut self, command: &C, attempts: AttemptBudget, metadata: &CallMetadata, ) -> Result<TypedCommandResult<C::Outcome>, GeneratedExecutionError>
Executes and decodes one generated command, then performs one exact same-key outcome lookup if transport uncertainty remains.
Sourcepub async fn execute_generated_command_batch<C>(
&self,
commands: Vec<C>,
options: GeneratedBatchOptions,
attempts: AttemptBudget,
metadata: &CallMetadata,
) -> Result<GeneratedBatchResult<C::Outcome>, GeneratedBatchError>where
C: GeneratedCommand + Clone,
pub async fn execute_generated_command_batch<C>(
&self,
commands: Vec<C>,
options: GeneratedBatchOptions,
attempts: AttemptBudget,
metadata: &CallMetadata,
) -> Result<GeneratedBatchResult<C::Outcome>, GeneratedBatchError>where
C: GeneratedCommand + Clone,
Executes a bounded collection of ordinary generated commands with backpressure and independently ordered per-item results.
Sourcepub async fn execute_generated_command_batch_with_progress<C, F>(
&self,
commands: Vec<C>,
options: GeneratedBatchOptions,
attempts: AttemptBudget,
metadata: &CallMetadata,
report_progress: F,
) -> Result<GeneratedBatchResult<C::Outcome>, GeneratedBatchError>
pub async fn execute_generated_command_batch_with_progress<C, F>( &self, commands: Vec<C>, options: GeneratedBatchOptions, attempts: AttemptBudget, metadata: &CallMetadata, report_progress: F, ) -> Result<GeneratedBatchResult<C::Outcome>, GeneratedBatchError>
Executes a bounded generated-command batch and reports completion plus the largest contiguous, safely resumable input checkpoint.
Source§impl StableApplicationClient
impl StableApplicationClient
Sourcepub async fn execute_projected_query(
&mut self,
query: ProjectedQuery,
metadata: &CallMetadata,
) -> Result<ProjectedQueryOutcome, ApplicationClientError>
pub async fn execute_projected_query( &mut self, query: ProjectedQuery, metadata: &CallMetadata, ) -> Result<ProjectedQueryOutcome, ApplicationClientError>
Executes one projected columnar query through the application facade.
Source§impl StableApplicationClient
impl StableApplicationClient
Sourcepub async fn consume_generated_events<G: GeneratedEventConsumer>(
&mut self,
generated: G,
options: EventConsumerOptions,
metadata: &CallMetadata,
) -> Result<TypedEventBatch<G::Event>, ApplicationClientError>
pub async fn consume_generated_events<G: GeneratedEventConsumer>( &mut self, generated: G, options: EventConsumerOptions, metadata: &CallMetadata, ) -> Result<TypedEventBatch<G::Event>, ApplicationClientError>
Pulls and decodes one generated typed event batch.
Sourcepub async fn consume_generated_contextual<G: GeneratedEventConsumer>(
&mut self,
generated: G,
maximum_wait_nanos: u64,
metadata: &CallMetadata,
) -> Result<TypedContextualBatch<G::Event>, ApplicationClientError>
pub async fn consume_generated_contextual<G: GeneratedEventConsumer>( &mut self, generated: G, maximum_wait_nanos: u64, metadata: &CallMetadata, ) -> Result<TypedContextualBatch<G::Event>, ApplicationClientError>
Pulls and decodes one generated contextual work item.
Sourcepub async fn execute_generated_contextual_reaction<C: GeneratedCommand>(
&mut self,
consumer: &ApplicationEventConsumer,
reaction: &ApplicationContextualReaction,
command: &C,
metadata: &CallMetadata,
) -> Result<TypedCommandResult<C::Outcome>, GeneratedExecutionError>
pub async fn execute_generated_contextual_reaction<C: GeneratedCommand>( &mut self, consumer: &ApplicationEventConsumer, reaction: &ApplicationContextualReaction, command: &C, metadata: &CallMetadata, ) -> Result<TypedCommandResult<C::Outcome>, GeneratedExecutionError>
Executes one generated command through an available contextual reaction.
Sourcepub async fn watch_generated_query<G: GeneratedLiveQuery>(
&mut self,
generated: G,
cursor: Option<LiveQueryCursor>,
metadata: &CallMetadata,
) -> Result<TypedLiveQueryStream<G>, ApplicationClientError>
pub async fn watch_generated_query<G: GeneratedLiveQuery>( &mut self, generated: G, cursor: Option<LiveQueryCursor>, metadata: &CallMetadata, ) -> Result<TypedLiveQueryStream<G>, ApplicationClientError>
Opens and decodes one generated exact live query.
Sourcepub async fn consume_event_stream(
&mut self,
consumer: &ApplicationEventConsumer,
options: EventConsumerOptions,
metadata: &CallMetadata,
) -> Result<ApplicationEventBatch, ApplicationClientError>
pub async fn consume_event_stream( &mut self, consumer: &ApplicationEventConsumer, options: EventConsumerOptions, metadata: &CallMetadata, ) -> Result<ApplicationEventBatch, ApplicationClientError>
Pulls one bounded authorized batch from an exact generated stream.
Sourcepub async fn consume_event_stream_after(
&mut self,
consumer: &ApplicationEventConsumer,
options: EventConsumerOptions,
progress_cursor: Option<ApplicationEventProgressCursor>,
metadata: &CallMetadata,
) -> Result<ApplicationEventBatch, ApplicationClientError>
pub async fn consume_event_stream_after( &mut self, consumer: &ApplicationEventConsumer, options: EventConsumerOptions, progress_cursor: Option<ApplicationEventProgressCursor>, metadata: &CallMetadata, ) -> Result<ApplicationEventBatch, ApplicationClientError>
Continues one protected consumer from an opaque RiffDB cursor.
Sourcepub async fn consume_contextual_subscription(
&mut self,
consumer: &ApplicationEventConsumer,
maximum_wait_nanos: u64,
metadata: &CallMetadata,
) -> Result<ApplicationContextualBatch, ApplicationClientError>
pub async fn consume_contextual_subscription( &mut self, consumer: &ApplicationEventConsumer, maximum_wait_nanos: u64, metadata: &CallMetadata, ) -> Result<ApplicationContextualBatch, ApplicationClientError>
Pulls one contextual event with fresh same-snapshot hydrations.
Sourcepub async fn consume_contextual_subscription_after(
&mut self,
consumer: &ApplicationEventConsumer,
maximum_wait_nanos: u64,
progress_cursor: Option<ApplicationEventProgressCursor>,
metadata: &CallMetadata,
) -> Result<ApplicationContextualBatch, ApplicationClientError>
pub async fn consume_contextual_subscription_after( &mut self, consumer: &ApplicationEventConsumer, maximum_wait_nanos: u64, progress_cursor: Option<ApplicationEventProgressCursor>, metadata: &CallMetadata, ) -> Result<ApplicationContextualBatch, ApplicationClientError>
Continues one protected contextual subscription from an opaque cursor.
Sourcepub async fn acknowledge_contextual_item(
&mut self,
consumer: &ApplicationEventConsumer,
item: &ApplicationContextualWorkItem,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn acknowledge_contextual_item( &mut self, consumer: &ApplicationEventConsumer, item: &ApplicationContextualWorkItem, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Acknowledges one exact contextual lease after fresh authorization.
Sourcepub async fn acknowledge_contextual_lease(
&mut self,
consumer: &ApplicationEventConsumer,
evidence: &ApplicationEventLeaseEvidence,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn acknowledge_contextual_lease( &mut self, consumer: &ApplicationEventConsumer, evidence: &ApplicationEventLeaseEvidence, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Acknowledges exact contextual lease evidence after fresh authorization.
Sourcepub async fn negative_acknowledge_contextual_item(
&mut self,
consumer: &ApplicationEventConsumer,
item: &ApplicationContextualWorkItem,
retry_delay_nanos: u64,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn negative_acknowledge_contextual_item( &mut self, consumer: &ApplicationEventConsumer, item: &ApplicationContextualWorkItem, retry_delay_nanos: u64, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Negatively acknowledges one exact contextual lease with bounded delay.
Sourcepub async fn negative_acknowledge_contextual_lease(
&mut self,
consumer: &ApplicationEventConsumer,
evidence: &ApplicationEventLeaseEvidence,
retry_delay_nanos: u64,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn negative_acknowledge_contextual_lease( &mut self, consumer: &ApplicationEventConsumer, evidence: &ApplicationEventLeaseEvidence, retry_delay_nanos: u64, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Releases exact contextual lease evidence with a bounded retry delay.
Sourcepub async fn contextual_subscription_status(
&mut self,
consumer: &ApplicationEventConsumer,
metadata: &CallMetadata,
) -> Result<Option<ApplicationEventConsumerPublicStatus>, ApplicationClientError>
pub async fn contextual_subscription_status( &mut self, consumer: &ApplicationEventConsumer, metadata: &CallMetadata, ) -> Result<Option<ApplicationEventConsumerPublicStatus>, ApplicationClientError>
Reads one contextual consumer status under contextual consume authority.
Sourcepub async fn execute_contextual_reaction(
&mut self,
consumer: &ApplicationEventConsumer,
reaction: &ApplicationContextualReaction,
command: ApplicationCommand,
metadata: &CallMetadata,
) -> Result<ApplicationCommandResult, ApplicationClientError>
pub async fn execute_contextual_reaction( &mut self, consumer: &ApplicationEventConsumer, reaction: &ApplicationContextualReaction, command: ApplicationCommand, metadata: &CallMetadata, ) -> Result<ApplicationCommandResult, ApplicationClientError>
Executes one declared reaction through the ordinary typed command envelope.
Sourcepub async fn stream_event_consumer(
&mut self,
consumer: &ApplicationEventConsumer,
options: EventConsumerOptions,
metadata: &CallMetadata,
) -> Result<ApplicationEventResponseStream, ApplicationClientError>
pub async fn stream_event_consumer( &mut self, consumer: &ApplicationEventConsumer, options: EventConsumerOptions, metadata: &CallMetadata, ) -> Result<ApplicationEventResponseStream, ApplicationClientError>
Opens the checked server stream for the same consumer operation.
Sourcepub async fn acknowledge_event(
&mut self,
consumer: &ApplicationEventConsumer,
delivery: &ApplicationEventDelivery,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn acknowledge_event( &mut self, consumer: &ApplicationEventConsumer, delivery: &ApplicationEventDelivery, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Acknowledges one exact live lease under the same reauthorized identity.
Sourcepub async fn acknowledge_event_lease(
&mut self,
consumer: &ApplicationEventConsumer,
evidence: &ApplicationEventLeaseEvidence,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn acknowledge_event_lease( &mut self, consumer: &ApplicationEventConsumer, evidence: &ApplicationEventLeaseEvidence, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Acknowledges one exact checked lease identity.
Sourcepub async fn negative_acknowledge_event(
&mut self,
consumer: &ApplicationEventConsumer,
delivery: &ApplicationEventDelivery,
retry_delay_nanos: u64,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn negative_acknowledge_event( &mut self, consumer: &ApplicationEventConsumer, delivery: &ApplicationEventDelivery, retry_delay_nanos: u64, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Negatively acknowledges one exact live lease with a bounded delay.
Sourcepub async fn negative_acknowledge_event_lease(
&mut self,
consumer: &ApplicationEventConsumer,
evidence: &ApplicationEventLeaseEvidence,
retry_delay_nanos: u64,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn negative_acknowledge_event_lease( &mut self, consumer: &ApplicationEventConsumer, evidence: &ApplicationEventLeaseEvidence, retry_delay_nanos: u64, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Negatively acknowledges one exact checked lease identity.
Sourcepub async fn seek_event_consumer(
&mut self,
consumer: &ApplicationEventConsumer,
checkpoint: ApplicationEventCheckpoint,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn seek_event_consumer( &mut self, consumer: &ApplicationEventConsumer, checkpoint: ApplicationEventCheckpoint, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Moves one exact consumer checkpoint after server-side membership proof.
Sourcepub async fn seek_protected_event_consumer(
&mut self,
consumer: &ApplicationEventConsumer,
cursor: ApplicationEventProgressCursor,
metadata: &CallMetadata,
) -> Result<ApplicationEventMutationResult, ApplicationClientError>
pub async fn seek_protected_event_consumer( &mut self, consumer: &ApplicationEventConsumer, cursor: ApplicationEventProgressCursor, metadata: &CallMetadata, ) -> Result<ApplicationEventMutationResult, ApplicationClientError>
Moves one protected consumer to an opaque position previously issued under the same current principal, role, capability, and stream identity.
Sourcepub async fn event_consumer_status(
&mut self,
consumer: &ApplicationEventConsumer,
metadata: &CallMetadata,
) -> Result<Option<ApplicationEventConsumerPublicStatus>, ApplicationClientError>
pub async fn event_consumer_status( &mut self, consumer: &ApplicationEventConsumer, metadata: &CallMetadata, ) -> Result<Option<ApplicationEventConsumerPublicStatus>, ApplicationClientError>
Reads bounded status under consume authority.
Sourcepub async fn watch_named_query(
&mut self,
operation: &ApplicationReactiveOperation,
cursor: Option<LiveQueryCursor>,
metadata: &CallMetadata,
) -> Result<ApplicationLiveQueryStream, ApplicationClientError>
pub async fn watch_named_query( &mut self, operation: &ApplicationReactiveOperation, cursor: Option<LiveQueryCursor>, metadata: &CallMetadata, ) -> Result<ApplicationLiveQueryStream, ApplicationClientError>
Opens one exact generated named-query watch with optional cursor evidence.
Trait Implementations§
Source§impl Clone for StableApplicationClient
impl Clone for StableApplicationClient
Source§fn clone(&self) -> StableApplicationClient
fn clone(&self) -> StableApplicationClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for StableApplicationClient
impl !RefUnwindSafe for StableApplicationClient
impl !UnwindSafe for StableApplicationClient
impl Send for StableApplicationClient
impl Sync for StableApplicationClient
impl Unpin for StableApplicationClient
impl UnsafeUnpin for StableApplicationClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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>,
Layered].