pub struct LocalDurableContext<P: Provider> { /* private fields */ }Expand description
A passthrough durable context for local development and testing.
Executes LLM calls and tool calls directly without journaling. No crash recovery, no replay — just direct passthrough.
This is the default when you do not need durable execution but want
a concrete DurableContext implementation.
Implementations§
Source§impl<P: Provider> LocalDurableContext<P>
impl<P: Provider> LocalDurableContext<P>
Sourcepub fn new(provider: Arc<P>, tools: Arc<ToolRegistry>) -> Self
pub fn new(provider: Arc<P>, tools: Arc<ToolRegistry>) -> Self
Create a new local durable context.
Trait Implementations§
Source§impl<P: Provider> DurableContext for LocalDurableContext<P>
impl<P: Provider> DurableContext for LocalDurableContext<P>
Source§async fn execute_llm_call(
&self,
request: CompletionRequest,
_options: ActivityOptions,
) -> Result<CompletionResponse, DurableError>
async fn execute_llm_call( &self, request: CompletionRequest, _options: ActivityOptions, ) -> Result<CompletionResponse, DurableError>
Execute an LLM call as a durable activity.
Source§async fn execute_tool(
&self,
tool_name: &str,
input: Value,
ctx: &ToolContext,
_options: ActivityOptions,
) -> Result<ToolOutput, DurableError>
async fn execute_tool( &self, tool_name: &str, input: Value, ctx: &ToolContext, _options: ActivityOptions, ) -> Result<ToolOutput, DurableError>
Execute a tool call as a durable activity.
Source§async fn wait_for_signal<T: DeserializeOwned + WasmCompatSend>(
&self,
_signal_name: &str,
timeout: Duration,
) -> Result<Option<T>, DurableError>
async fn wait_for_signal<T: DeserializeOwned + WasmCompatSend>( &self, _signal_name: &str, timeout: Duration, ) -> Result<Option<T>, DurableError>
Wait for an external signal with a timeout.
Source§fn should_continue_as_new(&self) -> bool
fn should_continue_as_new(&self) -> bool
Whether the workflow should continue-as-new to avoid history bloat.
Source§async fn continue_as_new(&self, _state: Value) -> Result<(), DurableError>
async fn continue_as_new(&self, _state: Value) -> Result<(), DurableError>
Continue the workflow as a new execution with the given state.
Auto Trait Implementations§
impl<P> Freeze for LocalDurableContext<P>
impl<P> !RefUnwindSafe for LocalDurableContext<P>
impl<P> Send for LocalDurableContext<P>
impl<P> Sync for LocalDurableContext<P>
impl<P> Unpin for LocalDurableContext<P>
impl<P> UnsafeUnpin for LocalDurableContext<P>
impl<P> !UnwindSafe for LocalDurableContext<P>
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