pub(crate) struct FileConfig {
pub(crate) gateway: Option<String>,
pub(crate) verbose: Option<bool>,
pub(crate) keys_file: Option<PathBuf>,
pub(crate) api_key: Option<String>,
pub(crate) trade_pwd_account: Option<String>,
pub(crate) enable_trading: Option<bool>,
pub(crate) allow_real_trading: Option<bool>,
pub(crate) audit_log: Option<PathBuf>,
pub(crate) http_listen: Option<String>,
pub(crate) tls_cert: Option<PathBuf>,
pub(crate) tls_key: Option<PathBuf>,
}Expand description
TOML 配置文件映射——字段名与 CLI 参数完全一致
codex 0547 F4 (P2) fix: 加 #[serde(deny_unknown_fields)] — 与 futu-opend
XmlConfig (BUG-006 v1.4.102 加的) 同语义级别. typo (e.g. keys_flie /
auditlog) 之前 silent drop, 用户配置 silent 失效:
key_filetypo → keystore 不加载 → MCP 进 legacy mode (无 scope)http_litsentypo → HTTP transport 不启动 (默认 stdio)auditlogtypo → 审计文件无事件
修后: 任何 unknown field / typo / [server] 类未支持 section 立即 parse
fatal, daemon abort + 清晰错误.
不 break 老 deprecated alias: 没有 alias 历史, MCP TOML schema 自 v1.0 起字段名稳定, 升级用户无 typo 不会被影响.
Fields§
§gateway: Option<String>§verbose: Option<bool>§keys_file: Option<PathBuf>§api_key: Option<String>§trade_pwd_account: Option<String>§enable_trading: Option<bool>§allow_real_trading: Option<bool>§audit_log: Option<PathBuf>§http_listen: Option<String>§tls_cert: Option<PathBuf>§tls_key: Option<PathBuf>Trait Implementations§
Source§impl Debug for FileConfig
impl Debug for FileConfig
Source§impl Default for FileConfig
impl Default for FileConfig
Source§fn default() -> FileConfig
fn default() -> FileConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FileConfigwhere
FileConfig: Default,
impl<'de> Deserialize<'de> for FileConfigwhere
FileConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FileConfig
impl RefUnwindSafe for FileConfig
impl Send for FileConfig
impl Sync for FileConfig
impl Unpin for FileConfig
impl UnsafeUnpin for FileConfig
impl UnwindSafe for FileConfig
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more