Skip to main content

ClientConfig

Struct ClientConfig 

Source
pub struct ClientConfig {
Show 22 fields pub endpoint: String, pub backend_id: String, pub endpoint_class: String, pub bearer: Option<Secret>, pub tls: Option<Arc<ClientConfig>>, pub setup_budget_ms: u64, pub transport_timeout_ms: Option<u64>, pub transit_margin_ms: u64, pub unit_rate: UnitRate, pub privacy: BTreeMap<String, String>, pub batching: Option<BatchConfig>, pub retain_bytes: bool, pub await_cancel_confirmation: bool, pub cancel_budget_ms: u64, pub phases: TransportPhases, pub protocol_major: u32, pub operator: EndpointOperator, pub principal: PrincipalPosture, pub pool: Option<Arc<HttpPool>>, pub tls_label: Option<String>, pub batch_dispatch: Option<u32>, pub run_evidence: bool,
}
Expand description

Host configuration. Credentials, addresses, rates and concurrency are configuration; only ClientConfig::endpoint_class, the privacy options and the negotiated remote identity enter the artifact identity.

Fields§

§endpoint: String

http[s]://host:port[/base]; plain http only for loopback.

§backend_id: String

The hosted backend to bind.

§endpoint_class: String

Names the endpoint in the identity; never a secret URL or key.

§bearer: Option<Secret>§tls: Option<Arc<ClientConfig>>

Overrides the default TLS configuration (webpki roots).

§setup_budget_ms: u64

The budget of negotiation at construction.

§transport_timeout_ms: Option<u64>

A transport limit shorter than the budget, if any. Longer than the setup budget is refused at construction (section 6).

§transit_margin_ms: u64

Subtracted from the budget the remote side is told (3.4.1).

§unit_rate: UnitRate

Deployment units per remote unit (3.8.1).

§privacy: BTreeMap<String, String>

Sent on every request and recorded as requested (3.8.2).

§batching: Option<BatchConfig>

Off by default.

§retain_bytes: bool

Retain request and response bytes for the sink (R-19: off).

§await_cancel_confirmation: bool

When the terms confirm cancellation, wait (within the attempt’s budget) for the confirmation before answering the signal. The runtime polls a cancelled attempt once, so with this on it records the answer as not observed; off by default.

§cancel_budget_ms: u64

The budget of a cancel exchange sent after the attempt answered.

§phases: TransportPhases

Phase ceilings inside each attempt’s one budget (spec 020, 3.4). Disabled by default; enabling it changes the binding identity.

§protocol_major: u32

The protocol major version this binding negotiates, exactly: 1 (the default) or 2 (spec 020, 2). No per-call upgrade or downgrade.

§operator: EndpointOperator

Who operates the endpoint; third party by default (spec 020, 3.6).

§principal: PrincipalPosture

The principal wire posture; omitted by default (spec 020, 3.6).

§pool: Option<Arc<HttpPool>>

Reuse connections from this host-owned pool (spec 020, 3.5); none by default, so every exchange opens its own connection. Clients sharing a pool share connections only under an exact isolation key.

§tls_label: Option<String>

The host’s nonsecret label for its own tls configuration, an isolation-key member. With a custom configuration and no label the key is unknown and no connection is reused.

§batch_dispatch: Option<u32>

Accept runtime-planned batches of at most this many members (spec 020, 3.3), when the remote terms offer shared-state batching. Off by default; the runtime still batches only under an enabled spec 017 policy. Enabling it changes the binding identity.

§run_evidence: bool

The evidence sink accepts rustev.run/2 (spec 020, 3.1 and 3.2): keep each attempt’s remote evidence for the runtime to take. Off by default; enabling it changes the binding identity.

Implementations§

Source§

impl ClientConfig

Source

pub fn new( endpoint: impl Into<String>, backend_id: impl Into<String>, endpoint_class: impl Into<String>, ) -> Self

Trait Implementations§

Source§

impl Clone for ClientConfig

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

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.