pub struct Config {
pub ai: AIConfig,
pub formats: FormatsConfig,
pub sync: SyncConfig,
pub general: GeneralConfig,
pub parallel: ParallelConfig,
pub translation: TranslationConfig,
pub loaded_from: Option<PathBuf>,
}Expand description
Root configuration types.
Legacy re-exports: these types now live in the subx-core crate, where
the canonical paths are subx_core::Config and subx_core::ConfigService
and so on. They exist for consumers that have not yet migrated and will
be removed once they have.
Full application configuration for SubX.
This struct aggregates all settings for AI integration, subtitle format conversion, synchronization, general options, and parallel execution.
§Examples
use subx_core::config::Config;
let config = Config::default();
assert_eq!(config.ai.provider, "openai");
assert_eq!(config.formats.default_output, "srt");§Serialization
This struct can be serialized to/from TOML format for configuration files.
use subx_core::config::Config;
let config = Config::default();
let toml_str = toml::to_string(&config)?;
assert!(toml_str.contains("[ai]"));Fields§
§ai: AIConfigAI service configuration parameters.
formats: FormatsConfigSubtitle format conversion settings.
sync: SyncConfigAudio-subtitle synchronization options.
general: GeneralConfigGeneral runtime options (e.g., backup enabled, job limits).
parallel: ParallelConfigParallel processing parameters.
translation: TranslationConfigSubtitle translation configuration parameters.
loaded_from: Option<PathBuf>Optional file path from which the configuration was loaded.