pub struct ChainExecutionEngine { /* private fields */ }Expand description
Engine for executing request chains
Implementations§
Source§impl ChainExecutionEngine
impl ChainExecutionEngine
Sourcepub fn new(registry: Arc<RequestChainRegistry>, config: ChainConfig) -> Self
pub fn new(registry: Arc<RequestChainRegistry>, config: ChainConfig) -> Self
Create a new chain execution engine
§Panics
This method will panic if the HTTP client cannot be created, which typically
indicates a system configuration issue. For better error handling, use try_new().
Sourcepub fn try_new(
registry: Arc<RequestChainRegistry>,
config: ChainConfig,
) -> Result<Self>
pub fn try_new( registry: Arc<RequestChainRegistry>, config: ChainConfig, ) -> Result<Self>
Try to create a new chain execution engine
Returns an error if the HTTP client cannot be created.
Sourcepub async fn execute_chain(
&self,
chain_id: &str,
variables: Option<Value>,
) -> Result<ChainExecutionResult>
pub async fn execute_chain( &self, chain_id: &str, variables: Option<Value>, ) -> Result<ChainExecutionResult>
Execute a chain by ID
Sourcepub async fn get_chain_history(&self, chain_id: &str) -> Vec<ExecutionRecord>
pub async fn get_chain_history(&self, chain_id: &str) -> Vec<ExecutionRecord>
Get execution history for a chain
Sourcepub async fn execute_chain_definition(
&self,
chain_def: &ChainDefinition,
variables: Option<Value>,
) -> Result<ChainExecutionResult>
pub async fn execute_chain_definition( &self, chain_def: &ChainDefinition, variables: Option<Value>, ) -> Result<ChainExecutionResult>
Execute a chain definition
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChainExecutionEngine
impl !RefUnwindSafe for ChainExecutionEngine
impl Send for ChainExecutionEngine
impl Sync for ChainExecutionEngine
impl Unpin for ChainExecutionEngine
impl !UnwindSafe for ChainExecutionEngine
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