pub struct Config {
pub server_url: Option<String>,
pub store: Option<Arc<dyn TokenStore>>,
pub http: Option<Client>,
pub retry_policy: Option<RetryPolicy>,
pub compliance_base_url: Option<String>,
pub api_base_url: Option<String>,
pub oauth_metadata_profile: Option<OAuthMetadataProfile>,
pub browser_refresh_mode: Option<BrowserRefreshMode>,
pub refresh_proxy_url: Option<String>,
}Expand description
客户端配置。所有字段可选。
偏移说明:TS 有 serverURL/baseURL/baseUrl 三别名(JS 命名容忍);Rust 收敛为
单一 server_url。
Fields§
§server_url: Option<String>网关 base URL;缺省 DEFAULT_GATEWAY_BASE_URL。
store: Option<Arc<dyn TokenStore>>自定义 TokenStore;缺省按平台选(原生 = File)。
http: Option<Client>自定义 HTTP client(对应 TS fetchImpl)。
retry_policy: Option<RetryPolicy>重试策略;None = 禁用重试(与 TS 默认一致)。
compliance_base_url: Option<String>compliance 端点 base override。
api_base_url: Option<String>业务 API 端点 base override。
oauth_metadata_profile: Option<OAuthMetadataProfile>OAuth 元数据 profile。
browser_refresh_mode: Option<BrowserRefreshMode>浏览器刷新模式。
refresh_proxy_url: Option<String>refresh 代理 URL(server-proxy 模式)。
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Config
impl !UnwindSafe for Config
impl Freeze for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
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