Skip to main content

QueuedWorkRunHandle

Trait QueuedWorkRunHandle 

Source
pub trait QueuedWorkRunHandle: Send + Sync {
    // Required method
    fn run_queued_work<'life0, 'async_trait>(
        &'life0 self,
        request: QueuedWorkRunRequest,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn claim_and_run_pending<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session_id: Option<&'life1 str>,
        reason: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait { ... }
}

Required Methods§

Source

fn run_queued_work<'life0, 'async_trait>( &'life0 self, request: QueuedWorkRunRequest, ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Provided Methods§

Source

fn claim_and_run_pending<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: Option<&'life1 str>, reason: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Host-driven single pass: claim and submit ready queued work, optionally narrowed to one session. The symmetric counterpart to ProcessRunHandle::claim_and_run_pending.

Idempotency is the store claim’s job (claim_ready_queued_work), not a same-process memory guard. Hosts call this on an event (enqueue, process wake, turn completion) instead of polling.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§