pub struct Executor {
pub tools: ToolRegistry,
pub providers: ProviderRegistry,
pub events: EventSink,
pub tool_ctx: ToolCtx,
pub safety: Option<SafetyConfig>,
pub source_dir: Option<PathBuf>,
}Fields§
§tools: ToolRegistry§providers: ProviderRegistry§events: EventSink§tool_ctx: ToolCtx§safety: Option<SafetyConfig>§source_dir: Option<PathBuf>When set, relative @ paths are resolved against this directory.
Implementations§
Source§impl Executor
impl Executor
pub fn new() -> Self
pub fn with_events(events: EventSink) -> Self
pub fn with_safety(self, safety: SafetyConfig) -> Self
pub async fn run( &self, file: &File, flow_name: &str, args: Vec<(String, Value)>, ) -> Result<Value, RuntimeError>
pub async fn run_in_turn( &self, file: &File, flow_name: &str, args: Vec<(String, Value)>, turn_id: Option<TurnId>, session: Option<Arc<Session>>, ) -> Result<Value, RuntimeError>
pub async fn run_in_turn_with_run_id( &self, file: &File, flow_name: &str, args: Vec<(String, Value)>, turn_id: Option<TurnId>, session: Option<Arc<Session>>, first_run_id: Option<FlowRunId>, ) -> Result<Value, RuntimeError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Executor
impl !UnwindSafe for Executor
impl Freeze for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl UnsafeUnpin for Executor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.