pub struct TurnWorkDriver { /* private fields */ }Expand description
Cooperative, exact-turn control compiled onto Lash’s keyed-promise seam.
Requested means the cancellation request won this driver’s keyed-promise
gate. On an inline effect host that promise is process-local, so the driver
only reaches owners in the same OS process. A durable effect-host deployment
is required for another process or replayed owner to observe the request.
The returned TurnCancelReceipt exposes that tier so hosts can gate their
UX rather than treating an inline receipt as cross-process proof.
Lash asks the running or replayed owner to unwind and commit a cancelled
result; it cannot guarantee that detached tasks, subprocesses, or
non-cooperative providers have stopped. Engine invocation cancellation
remains a host-owned break-glass action and is never proof of a Lash
Cancelled result.
Session and turn ids are routing identity, not authorization. Hosts must enforce authorization before exposing this driver across a trust boundary.
Implementations§
Source§impl TurnWorkDriver
impl TurnWorkDriver
pub fn new(effect_host: Arc<dyn EffectHost>) -> TurnWorkDriver
pub fn with_attach(self, attach: Arc<dyn TurnAttach>) -> TurnWorkDriver
pub fn effect_host(&self) -> Arc<dyn EffectHost> ⓘ
pub async fn request_cancel( &self, request: TurnCancelRequest, ) -> Result<TurnCancelReceipt, RuntimeError>
pub async fn await_terminal( &self, address: &TurnAddress, ) -> Result<TurnTerminal, RuntimeError>
Sourcepub async fn await_terminal_with_timeout(
&self,
address: &TurnAddress,
timeout: Duration,
) -> Result<TurnTerminal, RuntimeError>
pub async fn await_terminal_with_timeout( &self, address: &TurnAddress, timeout: Duration, ) -> Result<TurnTerminal, RuntimeError>
Await a terminal publication for at most timeout.
Timing out only stops this caller’s attachment. It never resolves or poisons the turn’s first-writer-wins keyed promises.
Trait Implementations§
Source§impl Clone for TurnWorkDriver
impl Clone for TurnWorkDriver
Source§fn clone(&self) -> TurnWorkDriver
fn clone(&self) -> TurnWorkDriver
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more