pub struct ClientConfig {Show 23 fields
pub client_id: String,
pub token: Option<AuthToken>,
pub auth_proof_key_pem: Option<String>,
pub authenticated_principal: Option<String>,
pub server_key: Option<String>,
pub descriptor_key_id: Option<String>,
pub descriptor_public_key: Option<[u8; 32]>,
pub tls_enabled: bool,
pub tls_domain_name: Option<String>,
pub tls_ca_certificate_pem: Option<String>,
pub tls_skip_verify: bool,
pub allow_insecure: bool,
pub timeout_secs: u64,
pub compression: bool,
pub chunk_size: usize,
pub chunked_transfer: bool,
pub resumable_transfer: bool,
pub pack_transfer: bool,
pub partial_fetch: bool,
pub provider_global_concurrency: usize,
pub provider_per_endpoint_concurrency: usize,
pub provider_max_inflight_bytes: usize,
pub provider_stall_timeout_secs: u64,
}Expand description
Client configuration.
Fields§
§client_id: StringClient identifier.
token: Option<AuthToken>Authentication token.
auth_proof_key_pem: Option<String>Optional private key used to prove possession of a bound token.
authenticated_principal: Option<String>Stable authenticated principal bound to the bearer token. Request signatures use this value as their canonical identity; the device key remains only the proof key.
server_key: Option<String>Server key used to look up the credential in the credential store
(~/.heddle/credentials.toml). Matches the key used by heddle auth login.
descriptor_key_id: Option<String>Trusted descriptor-signing key identifier for native Iroh bootstrap.
descriptor_public_key: Option<[u8; 32]>Raw Ed25519 public key for the trusted descriptor-signing key.
tls_enabled: boolEnable TLS.
tls_domain_name: Option<String>Override the expected TLS server name.
tls_ca_certificate_pem: Option<String>Optional PEM CA certificate bundle for server verification.
tls_skip_verify: boolSkip TLS certificate verification (insecure).
allow_insecure: boolExplicitly allow cleartext (non-TLS) connections to non-loopback hosts.
Loopback cleartext is always permitted for local development. Non-loopback
cleartext requires this flag (CLI --insecure, remote insecure = true,
user config, or HEDDLE_REMOTE_INSECURE).
timeout_secs: u64Connection timeout in seconds.
compression: boolEnable compression.
chunk_size: usizePreferred chunk size.
chunked_transfer: boolEnable chunked transfer negotiation.
resumable_transfer: boolEnable resumable transfer negotiation.
pack_transfer: boolEnable pack transfer negotiation.
partial_fetch: boolEnable partial fetch negotiation.
provider_global_concurrency: usizeMaximum provider extent streams active across all provider endpoints.
provider_per_endpoint_concurrency: usizeMaximum provider extent streams multiplexed over one endpoint connection.
provider_max_inflight_bytes: usizeMaximum provider body bytes retained between transport reads and spool writes.
provider_stall_timeout_secs: u64Maximum seconds without provider transport progress before falling back.
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn new(client_id: impl Into<String>) -> ClientConfig
pub fn new(client_id: impl Into<String>) -> ClientConfig
Create a new client configuration.
Sourcepub fn with_token(self, token: AuthToken) -> ClientConfig
pub fn with_token(self, token: AuthToken) -> ClientConfig
Set authentication token.
Sourcepub fn with_auth_proof_key_pem(self, pem: impl Into<String>) -> ClientConfig
pub fn with_auth_proof_key_pem(self, pem: impl Into<String>) -> ClientConfig
Set a private key used for proof-of-possession metadata.
Sourcepub fn with_authenticated_principal(
self,
principal: impl Into<String>,
) -> ClientConfig
pub fn with_authenticated_principal( self, principal: impl Into<String>, ) -> ClientConfig
Set the stable principal authenticated by the bearer token.
Sourcepub fn with_server_key(self, key: impl Into<String>) -> ClientConfig
pub fn with_server_key(self, key: impl Into<String>) -> ClientConfig
Set the server key used to look up credentials in the credential store.
pub fn with_descriptor_trust( self, key_id: impl Into<String>, public_key: [u8; 32], ) -> ClientConfig
Sourcepub fn with_tls(self, skip_verify: bool) -> ClientConfig
pub fn with_tls(self, skip_verify: bool) -> ClientConfig
Enable TLS.
pub fn with_tls_domain_name( self, domain_name: impl Into<String>, ) -> ClientConfig
pub fn with_tls_ca_certificate_pem(self, pem: impl Into<String>) -> ClientConfig
Sourcepub fn with_timeout(self, secs: u64) -> ClientConfig
pub fn with_timeout(self, secs: u64) -> ClientConfig
Set timeout.
Sourcepub fn without_compression(self) -> ClientConfig
pub fn without_compression(self) -> ClientConfig
Disable compression.
Sourcepub fn with_chunk_size(self, size: usize) -> ClientConfig
pub fn with_chunk_size(self, size: usize) -> ClientConfig
Set chunk size.
Sourcepub fn with_chunked_transfer(self, enabled: bool) -> ClientConfig
pub fn with_chunked_transfer(self, enabled: bool) -> ClientConfig
Enable or disable chunked transfer negotiation.
Sourcepub fn with_resumable_transfer(self, enabled: bool) -> ClientConfig
pub fn with_resumable_transfer(self, enabled: bool) -> ClientConfig
Enable or disable resumable transfer negotiation.
Sourcepub fn with_pack_transfer(self, enabled: bool) -> ClientConfig
pub fn with_pack_transfer(self, enabled: bool) -> ClientConfig
Enable or disable pack transfer negotiation.
Sourcepub fn with_partial_fetch(self, enabled: bool) -> ClientConfig
pub fn with_partial_fetch(self, enabled: bool) -> ClientConfig
Enable or disable partial fetch negotiation.
Sourcepub fn with_provider_global_concurrency(
self,
concurrency: usize,
) -> ClientConfig
pub fn with_provider_global_concurrency( self, concurrency: usize, ) -> ClientConfig
Set the maximum number of provider extent streams active globally.
Sourcepub fn with_provider_per_endpoint_concurrency(
self,
concurrency: usize,
) -> ClientConfig
pub fn with_provider_per_endpoint_concurrency( self, concurrency: usize, ) -> ClientConfig
Set the maximum provider extent streams multiplexed over one endpoint.
Sourcepub fn with_provider_max_inflight_bytes(self, bytes: usize) -> ClientConfig
pub fn with_provider_max_inflight_bytes(self, bytes: usize) -> ClientConfig
Set the provider body-byte budget shared by all active extent streams.
Sourcepub fn with_provider_stall_timeout(self, secs: u64) -> ClientConfig
pub fn with_provider_stall_timeout(self, secs: u64) -> ClientConfig
Set the provider transport progress threshold before ordinary Weft fallback.
Sourcepub fn with_allow_insecure(self, allow: bool) -> ClientConfig
pub fn with_allow_insecure(self, allow: bool) -> ClientConfig
Explicitly allow cleartext to non-loopback addresses.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientConfig
impl Debug for ClientConfig
Source§impl Default for ClientConfig
impl Default for ClientConfig
Source§fn default() -> ClientConfig
fn default() -> ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more