pub struct ConfigManager;
Expand description
配置管理器
Implementations§
Source§impl ConfigManager
impl ConfigManager
Sourcepub fn from_yaml_file_raw<P: AsRef<Path>>(
path: P,
) -> Result<RemoteExecutionConfig>
pub fn from_yaml_file_raw<P: AsRef<Path>>( path: P, ) -> Result<RemoteExecutionConfig>
从YAML文件加载配置(不处理变量替换)
Sourcepub fn from_yaml_str_raw(yaml_content: &str) -> Result<RemoteExecutionConfig>
pub fn from_yaml_str_raw(yaml_content: &str) -> Result<RemoteExecutionConfig>
从YAML字符串加载配置(不处理变量替换)
Sourcepub fn from_yaml_file_with_variables<P: AsRef<Path>>(
path: P,
variable_manager: &VariableManager,
) -> Result<RemoteExecutionConfig>
pub fn from_yaml_file_with_variables<P: AsRef<Path>>( path: P, variable_manager: &VariableManager, ) -> Result<RemoteExecutionConfig>
从YAML文件加载配置并应用变量替换
Sourcepub fn from_yaml_str_with_variables(
yaml_content: &str,
variable_manager: &VariableManager,
) -> Result<RemoteExecutionConfig>
pub fn from_yaml_str_with_variables( yaml_content: &str, variable_manager: &VariableManager, ) -> Result<RemoteExecutionConfig>
从YAML字符串加载配置并应用变量替换
Sourcepub fn extract_initial_variables(
yaml_content: &str,
) -> Result<Option<HashMap<String, String>>>
pub fn extract_initial_variables( yaml_content: &str, ) -> Result<Option<HashMap<String, String>>>
提取YAML中的初始变量
Sourcepub fn from_yaml_file<P: AsRef<Path>>(path: P) -> Result<RemoteExecutionConfig>
pub fn from_yaml_file<P: AsRef<Path>>(path: P) -> Result<RemoteExecutionConfig>
从YAML文件加载配置(保持向后兼容)
Sourcepub fn from_yaml_str(yaml_content: &str) -> Result<RemoteExecutionConfig>
pub fn from_yaml_str(yaml_content: &str) -> Result<RemoteExecutionConfig>
从YAML字符串加载配置(保持向后兼容)
Sourcepub fn validate_config(config: &RemoteExecutionConfig) -> Result<()>
pub fn validate_config(config: &RemoteExecutionConfig) -> Result<()>
验证配置的有效性
Auto Trait Implementations§
impl Freeze for ConfigManager
impl RefUnwindSafe for ConfigManager
impl Send for ConfigManager
impl Sync for ConfigManager
impl Unpin for ConfigManager
impl UnwindSafe for ConfigManager
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