Skip to main content

TemporalBackend

Trait TemporalBackend 

Source
pub trait TemporalBackend:
    Send
    + Sync
    + Debug {
    // Required method
    fn run(
        &self,
        worker: &Worker,
        request: &Request,
        deadline: Duration,
        cancel: &AtomicBool,
    ) -> Dispatch;

    // Provided method
    fn replay_policy(&self) -> Option<ReplayPolicy> { ... }
}
Expand description

A native temporal backend linked into this sail build.

The runtime authenticates the installed worker and admits the job before calling TemporalBackend::run. The backend owns the worker process and must independently validate the worker’s evidence against request before returning Dispatch::Completed; anything it cannot validate is Dispatch::Failed, never a verdict.

Required Methods§

Source

fn run( &self, worker: &Worker, request: &Request, deadline: Duration, cancel: &AtomicBool, ) -> Dispatch

Run one admitted request in worker, killing and reaping it when deadline elapses or cancel is set.

Provided Methods§

Source

fn replay_policy(&self) -> Option<ReplayPolicy>

Opt in to exact check replay under a producer-specific policy and validator. Change the policy identity whenever checking or evidence admission changes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§