pub struct WorkflowLoader;Expand description
工作流加载器,支持从文件或字符串加载配置
Implementations§
Source§impl WorkflowLoader
impl WorkflowLoader
Sourcepub fn from_yaml_file<P: AsRef<Path>>(path: P) -> Result<WorkflowConfig>
pub fn from_yaml_file<P: AsRef<Path>>(path: P) -> Result<WorkflowConfig>
从 YAML 文件加载工作流配置
Sourcepub fn from_yaml_str(content: &str) -> Result<WorkflowConfig>
pub fn from_yaml_str(content: &str) -> Result<WorkflowConfig>
从 YAML 字符串加载工作流配置
Sourcepub fn from_json_file<P: AsRef<Path>>(path: P) -> Result<WorkflowConfig>
pub fn from_json_file<P: AsRef<Path>>(path: P) -> Result<WorkflowConfig>
从 JSON 文件加载工作流配置
Sourcepub fn from_json_str(content: &str) -> Result<WorkflowConfig>
pub fn from_json_str(content: &str) -> Result<WorkflowConfig>
从 JSON 字符串加载工作流配置
Sourcepub fn save_to_yaml<P: AsRef<Path>>(
config: &WorkflowConfig,
path: P,
) -> Result<()>
pub fn save_to_yaml<P: AsRef<Path>>( config: &WorkflowConfig, path: P, ) -> Result<()>
保存工作流配置到 YAML 文件
Sourcepub fn save_to_json<P: AsRef<Path>>(
config: &WorkflowConfig,
path: P,
) -> Result<()>
pub fn save_to_json<P: AsRef<Path>>( config: &WorkflowConfig, path: P, ) -> Result<()>
保存工作流配置到 JSON 文件
Sourcepub fn validate(config: &WorkflowConfig) -> Result<()>
pub fn validate(config: &WorkflowConfig) -> Result<()>
验证工作流配置的基本有效性
Sourcepub fn create_runtime_executor(
config: WorkflowConfig,
) -> Result<DynamicFlowExecutor>
pub fn create_runtime_executor( config: WorkflowConfig, ) -> Result<DynamicFlowExecutor>
从配置创建带有 runtime 功能的执行器
Auto Trait Implementations§
impl Freeze for WorkflowLoader
impl RefUnwindSafe for WorkflowLoader
impl Send for WorkflowLoader
impl Sync for WorkflowLoader
impl Unpin for WorkflowLoader
impl UnwindSafe for WorkflowLoader
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