pub struct ClientConfig {Show 15 fields
pub client_id: String,
pub token: Option<AuthToken>,
pub auth_proof_key_pem: Option<String>,
pub server_key: Option<String>,
pub tls_enabled: bool,
pub tls_domain_name: Option<String>,
pub tls_ca_certificate_pem: Option<String>,
pub tls_skip_verify: 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,
}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.
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.
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).
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.
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn with_token(self, token: AuthToken) -> Self
pub fn with_token(self, token: AuthToken) -> Self
Set authentication token.
Sourcepub fn with_auth_proof_key_pem(self, pem: impl Into<String>) -> Self
pub fn with_auth_proof_key_pem(self, pem: impl Into<String>) -> Self
Set a private key used for proof-of-possession metadata.
Sourcepub fn with_server_key(self, key: impl Into<String>) -> Self
pub fn with_server_key(self, key: impl Into<String>) -> Self
Set the server key used to look up credentials in the credential store.
pub fn with_tls_domain_name(self, domain_name: impl Into<String>) -> Self
pub fn with_tls_ca_certificate_pem(self, pem: impl Into<String>) -> Self
Sourcepub fn with_timeout(self, secs: u64) -> Self
pub fn with_timeout(self, secs: u64) -> Self
Set timeout.
Sourcepub fn without_compression(self) -> Self
pub fn without_compression(self) -> Self
Disable compression.
Sourcepub fn with_chunk_size(self, size: usize) -> Self
pub fn with_chunk_size(self, size: usize) -> Self
Set chunk size.
Sourcepub fn with_chunked_transfer(self, enabled: bool) -> Self
pub fn with_chunked_transfer(self, enabled: bool) -> Self
Enable or disable chunked transfer negotiation.
Sourcepub fn with_resumable_transfer(self, enabled: bool) -> Self
pub fn with_resumable_transfer(self, enabled: bool) -> Self
Enable or disable resumable transfer negotiation.
Sourcepub fn with_pack_transfer(self, enabled: bool) -> Self
pub fn with_pack_transfer(self, enabled: bool) -> Self
Enable or disable pack transfer negotiation.
Sourcepub fn with_partial_fetch(self, enabled: bool) -> Self
pub fn with_partial_fetch(self, enabled: bool) -> Self
Enable or disable partial fetch negotiation.
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 more