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;
}
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.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§