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 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_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.
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.
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request