pub struct ProjectedFlowHandle { /* private fields */ }Expand description
Non-clone host handle that retains one exact Code projection and A3S Use lease.
Every operation uses the FlowBinding selected at admission. Publishing a
newer catalog generation cannot replace this handle’s workflow definition,
engine, event store, or runtime-build compatibility boundary. Call
close when the host has finished its current execution or
inspection window.
Implementations§
Source§impl ProjectedFlowHandle
impl ProjectedFlowHandle
Sourcepub fn public_name(&self) -> &str
pub fn public_name(&self) -> &str
Stable public name selected from the admitted capability generation.
Sourcepub fn spec(&self) -> &WorkflowSpec
pub fn spec(&self) -> &WorkflowSpec
Exact durable workflow definition frozen into this handle.
Sourcepub fn use_generation(&self) -> Option<&UseCapabilityGeneration>
pub fn use_generation(&self) -> Option<&UseCapabilityGeneration>
Upstream A3S Use generation retained by this handle, when applicable.
Sourcepub async fn start(&self, input: Value) -> Result<String>
pub async fn start(&self, input: Value) -> Result<String>
Start a workflow with a generated durable run id and drive it to a terminal or suspended state.
Sourcepub async fn start_with_id(
&self,
run_id: impl Into<String>,
input: Value,
) -> Result<String>
pub async fn start_with_id( &self, run_id: impl Into<String>, input: Value, ) -> Result<String>
Start or idempotently replay a workflow using a caller-owned durable id.
Sourcepub async fn drive(&self, run_id: &str) -> Result<WorkflowRunSnapshot>
pub async fn drive(&self, run_id: &str) -> Result<WorkflowRunSnapshot>
Resume replay of an existing durable workflow run.
Sourcepub async fn snapshot(&self, run_id: &str) -> Result<WorkflowRunSnapshot>
pub async fn snapshot(&self, run_id: &str) -> Result<WorkflowRunSnapshot>
Read the current event-sourced workflow snapshot.
Sourcepub async fn history(&self, run_id: &str) -> Result<Vec<FlowEventEnvelope>>
pub async fn history(&self, run_id: &str) -> Result<Vec<FlowEventEnvelope>>
Read the durable event history for a workflow run.
Sourcepub async fn cancel(&self, run_id: &str, reason: Option<String>) -> Result<()>
pub async fn cancel(&self, run_id: &str, reason: Option<String>) -> Result<()>
Request durable cancellation of a workflow run.
Sourcepub async fn close(self) -> Result<ScopeCloseReport>
pub async fn close(self) -> Result<ScopeCloseReport>
Close the exact Code/Use capability scope retained by this handle.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProjectedFlowHandle
impl !UnwindSafe for ProjectedFlowHandle
impl Freeze for ProjectedFlowHandle
impl Send for ProjectedFlowHandle
impl Sync for ProjectedFlowHandle
impl Unpin for ProjectedFlowHandle
impl UnsafeUnpin for ProjectedFlowHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more