pub struct ClientConfig {
pub api_key: String,
pub base_url: Option<String>,
pub timeout_secs: u64,
pub max_retries: u32,
pub use_bearer: bool,
pub insecure: bool,
pub trust_root_pem: Option<Vec<u8>>,
}Expand description
Configuration for the Cognitum Client.
Fields§
§api_key: StringAPI key used by default in the X-API-Key header (per ADR-0003).
If use_bearer is enabled via ClientBuilder::deprecated_bearer_auth,
the legacy Authorization: Bearer <key> header is sent alongside
X-API-Key for the deprecation window.
base_url: Option<String>Override the API base URL (useful for testing).
timeout_secs: u64HTTP request timeout in seconds.
max_retries: u32Maximum number of automatic retries for transient errors (429/500/503).
use_bearer: boolEmit the legacy Authorization: Bearer <key> header in addition to
X-API-Key. Kept for 2 minor releases per ADR-0003.
insecure: boolAccept invalid/self-signed TLS certificates. Development only.
trust_root_pem: Option<Vec<u8>>PEM-encoded root certificate to trust as the sole issuer for pinning
self-signed seed certs. Mutually exclusive with insecure.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientConfig
impl Debug for 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
Mutably borrows from an owned value. Read more