WorkflowLoader

Struct WorkflowLoader 

Source
pub struct WorkflowLoader;
Expand description

工作流加载器,支持从文件或字符串加载配置

Implementations§

Source§

impl WorkflowLoader

Source

pub fn from_yaml_file<P: AsRef<Path>>(path: P) -> Result<WorkflowConfig>

从 YAML 文件加载工作流配置

Source

pub fn from_yaml_str(content: &str) -> Result<WorkflowConfig>

从 YAML 字符串加载工作流配置

Source

pub fn from_json_file<P: AsRef<Path>>(path: P) -> Result<WorkflowConfig>

从 JSON 文件加载工作流配置

Source

pub fn from_json_str(content: &str) -> Result<WorkflowConfig>

从 JSON 字符串加载工作流配置

Source

pub fn save_to_yaml<P: AsRef<Path>>( config: &WorkflowConfig, path: P, ) -> Result<()>

保存工作流配置到 YAML 文件

Source

pub fn save_to_json<P: AsRef<Path>>( config: &WorkflowConfig, path: P, ) -> Result<()>

保存工作流配置到 JSON 文件

Source

pub fn validate(config: &WorkflowConfig) -> Result<()>

验证工作流配置的基本有效性

Source

pub fn create_runtime_executor( config: WorkflowConfig, ) -> Result<DynamicFlowExecutor>

从配置创建带有 runtime 功能的执行器

Source

pub async fn execute_workflow_file<P: AsRef<Path>>(path: P) -> Result<()>

快速执行工作流文件(使用 runtime 功能)

Source

pub async fn execute_workflow_batch<P: AsRef<Path>>( paths: Vec<P>, max_concurrent: usize, ) -> Result<Vec<Result<()>>>

批量执行多个工作流文件(简化版本)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.