Expand description
Centralized OptionHandler with config file parser (.aria2rc format).
This module provides OptionHandler, a self-contained option management
struct that holds all aria2 configuration values with built-in defaults,
supports loading from .aria2rc config files, applying CLI argument overrides,
and converting to DownloadOptions for use by download commands.
The design mirrors C++ aria2’s OptionHandler class for reference.
§Example
use aria2_core::option::{OptionHandler, OptionValue};
use std::path::Path;
let mut handler = OptionHandler::new();
handler.set("dir", OptionValue::Str("/downloads".into()));
handler.load_config_file(Path::new("~/.aria2rc")).ok();
let opts = handler.to_download_options();Structs§
- Option
Handler - Centralized option handler with built-in defaults, config file parsing, CLI argument override support, and DownloadOptions conversion.