pub struct ClientOptions {
pub provider: Provider,
pub base_url: Option<String>,
pub disable_proxy_for_local_base_url: bool,
pub timeout: Duration,
pub max_retries: u32,
pub default_headers: BTreeMap<String, String>,
pub default_query: BTreeMap<String, String>,
pub webhook_secret: Option<SecretString>,
pub log_level: LogLevel,
pub logger: Option<LoggerHandle>,
pub compatibility_mode: CompatibilityMode,
}Expand description
表示客户端级别的默认配置。
Fields§
§provider: Provider当前客户端使用的 Provider。
base_url: Option<String>覆盖默认的基础地址。
disable_proxy_for_local_base_url: bool当基础地址指向本机地址时,是否显式关闭系统代理,默认关闭。
timeout: Duration每次请求默认超时时间。
max_retries: u32默认最大重试次数。
default_headers: BTreeMap<String, String>发送前追加到所有请求中的默认请求头。
default_query: BTreeMap<String, String>发送前追加到所有请求中的默认查询参数。
webhook_secret: Option<SecretString>可选的 Webhook 密钥。
log_level: LogLevelSDK 内部日志级别。
logger: Option<LoggerHandle>可选的用户日志器。
compatibility_mode: CompatibilityModeProvider 兼容校验模式。
Trait Implementations§
Source§impl Clone for ClientOptions
impl Clone for ClientOptions
Source§fn clone(&self) -> ClientOptions
fn clone(&self) -> ClientOptions
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 ClientOptions
impl Debug for ClientOptions
Auto Trait Implementations§
impl Freeze for ClientOptions
impl !RefUnwindSafe for ClientOptions
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl UnsafeUnpin for ClientOptions
impl !UnwindSafe for ClientOptions
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