pub struct HandlerExecutor<T: KeyValueStore + 'static> { /* private fields */ }Expand description
Handler executor that manages execution across different environments
Implementations§
Source§impl<T: KeyValueStore + 'static> HandlerExecutor<T>
impl<T: KeyValueStore + 'static> HandlerExecutor<T>
Sourcepub fn new(handler: Arc<UnifiedHandler<T>>) -> Self
pub fn new(handler: Arc<UnifiedHandler<T>>) -> Self
Create new executor
Sourcepub fn with_mode(self, mode: ExecutionMode) -> Self
pub fn with_mode(self, mode: ExecutionMode) -> Self
Set execution mode
Sourcepub async fn execute_sync(
&self,
content: &str,
context: HandlerContext,
) -> Result<String>
pub async fn execute_sync( &self, content: &str, context: HandlerContext, ) -> Result<String>
Execute handler synchronously
Sourcepub async fn execute_async(
&self,
content: &str,
context: HandlerContext,
) -> Result<String>
pub async fn execute_async( &self, content: &str, context: HandlerContext, ) -> Result<String>
Execute handler asynchronously
Sourcepub async fn execute_streaming(
&self,
content: &str,
context: HandlerContext,
) -> Result<String>
pub async fn execute_streaming( &self, content: &str, context: HandlerContext, ) -> Result<String>
Execute handler with streaming
Sourcepub async fn execute_file(
&self,
file_path: &str,
context: HandlerContext,
) -> Result<String>
pub async fn execute_file( &self, file_path: &str, context: HandlerContext, ) -> Result<String>
Execute from file
Sourcepub async fn execute_batch(
&self,
requests: Vec<(String, HandlerContext)>,
) -> Result<Vec<String>>
pub async fn execute_batch( &self, requests: Vec<(String, HandlerContext)>, ) -> Result<Vec<String>>
Batch execute multiple handlers
Trait Implementations§
Source§impl<T: KeyValueStore + 'static> Default for HandlerExecutor<T>
impl<T: KeyValueStore + 'static> Default for HandlerExecutor<T>
Auto Trait Implementations§
impl<T> Freeze for HandlerExecutor<T>
impl<T> !RefUnwindSafe for HandlerExecutor<T>
impl<T> Send for HandlerExecutor<T>
impl<T> Sync for HandlerExecutor<T>
impl<T> Unpin for HandlerExecutor<T>
impl<T> !UnwindSafe for HandlerExecutor<T>
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