pub struct RemoteClient { /* private fields */ }Expand description
A DecisionBackend over rustev.remote/1. Clones share state.
Implementations§
Source§impl RemoteClient
impl RemoteClient
Sourcepub async fn connect(
config: ClientConfig,
sink: Arc<dyn ExchangeSink>,
) -> Result<RemoteClient, SetupError>
pub async fn connect( config: ClientConfig, sink: Arc<dyn ExchangeSink>, ) -> Result<RemoteClient, SetupError>
Construct the adapter: check the configuration, negotiate the protocol version, and obtain the remote descriptor and terms. The descriptor this adapter then returns is fixed for its lifetime.
Sourcepub fn terms(&self) -> &RemoteTerms
pub fn terms(&self) -> &RemoteTerms
The negotiated terms.
Sourcepub fn remote_descriptor(&self) -> (&BackendDescriptor, &DescriptorId)
pub fn remote_descriptor(&self) -> (&BackendDescriptor, &DescriptorId)
The remote backend’s own descriptor and its identity, as negotiated.
Sourcepub fn binding(&self) -> &ArtifactId
pub fn binding(&self) -> &ArtifactId
The adapter binding identity: this adapter’s artifact.
pub fn exchange_stats(&self) -> ExchangeStats
Trait Implementations§
Source§impl Clone for RemoteClient
impl Clone for RemoteClient
Source§impl DecisionBackend for RemoteClient
impl DecisionBackend for RemoteClient
Source§fn cost_model(&self) -> CostModel
fn cost_model(&self) -> CostModel
bounded only when the remote side enforces a per-call maximum it
declared (3.8.1).
Source§fn batch_capability(&self, projection: &[u8]) -> Option<BatchCapability>
fn batch_capability(&self, projection: &[u8]) -> Option<BatchCapability>
Offered only when the binding enables runtime-planned batches and the
negotiated terms declare shared-state batching (spec 020, 3.3).
Any per-item operation disables batching for the entire backend
(spec 035, 3.15.3, and spec 044, 3.7); the projected operation must
also be declared.
Equal compatibility means the same binding and the same shared state
(instance and values), which is what one request may carry.
fn descriptor(&self) -> &BackendDescriptor
Source§fn cost_bound(&self, _projection: &[u8]) -> CostBound
fn cost_bound(&self, _projection: &[u8]) -> CostBound
bounded model returns
bounded; fractional costs are rounded up.fn infer<'a>(&'a self, call: AttemptCall<'a>) -> BoxFuture<'a, AttemptReport>
Source§fn take_remote_evidence(&self, attempt_id: &str) -> Option<RemoteEvidence>
fn take_remote_evidence(&self, attempt_id: &str) -> Option<RemoteEvidence>
rustev.run/2 record (spec 020, 3.2), taken once: the adapter’s
part of the entry (exchange reference, identities, binding, code,
charge provenance); the runtime sets the step, instance and final
remote state. None, the default, for an in-process backend.Source§fn infer_batch<'a>(
&'a self,
call: BatchAttemptCall,
) -> BoxFuture<'a, BatchAttemptReport>
fn infer_batch<'a>( &'a self, call: BatchAttemptCall, ) -> BoxFuture<'a, BatchAttemptReport>
batch_capability implementation.