Skip to main content

RemoteClient

Struct RemoteClient 

Source
pub struct RemoteClient { /* private fields */ }
Expand description

A DecisionBackend over rustev.remote/1. Clones share state.

Implementations§

Source§

impl RemoteClient

Source

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.

Source

pub fn terms(&self) -> &RemoteTerms

The negotiated terms.

Source

pub fn remote_descriptor(&self) -> (&BackendDescriptor, &DescriptorId)

The remote backend’s own descriptor and its identity, as negotiated.

Source

pub fn binding(&self) -> &ArtifactId

The adapter binding identity: this adapter’s artifact.

Source

pub fn max_items(&self) -> usize

Items per exchange: 1 unless batching is on and offered.

Source

pub fn exchange_stats(&self) -> ExchangeStats

Trait Implementations§

Source§

impl Clone for RemoteClient

Source§

fn clone(&self) -> Self

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 DecisionBackend for RemoteClient

Source§

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>

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

Source§

fn descriptor(&self) -> &BackendDescriptor

Source§

fn cost_bound(&self, _projection: &[u8]) -> CostBound

Per-call disclosure before dispatch. A bounded model returns bounded; fractional costs are rounded up.
Source§

fn infer<'a>(&'a self, call: AttemptCall<'a>) -> BoxFuture<'a, AttemptReport>

Source§

fn take_remote_evidence(&self, attempt_id: &str) -> Option<RemoteEvidence>

The remote evidence of an attempt this backend ran, for a 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>

Dispatch a declared-compatible batch. The default is unreachable for a backend that keeps the default batch_capability implementation.

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

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.