Skip to main content

TaskSink

Trait TaskSink 

Source
pub trait TaskSink:
    Send
    + Sync
    + 'static {
    // Required methods
    fn dispatch_cache_purge<'life0, 'async_trait>(
        &'life0 self,
        job: CachePurgeJob,
    ) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn dispatch_reference_index<'life0, 'async_trait>(
        &'life0 self,
        job: ReferenceIndexJob,
    ) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn dispatch_search_index<'life0, 'async_trait>(
        &'life0 self,
        job: SearchIndexJob,
    ) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Object-safe enqueue surface the CMS holds globally. One method per CMS job kind (the set is small + CMS-owned). Hosts don’t implement this — they wrap their concrete JobQueue in JobQueueSink.

Required Methods§

Source

fn dispatch_cache_purge<'life0, 'async_trait>( &'life0 self, job: CachePurgeJob, ) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Enqueue a CachePurgeJob for asynchronous, retriable run.

Source

fn dispatch_reference_index<'life0, 'async_trait>( &'life0 self, job: ReferenceIndexJob, ) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Enqueue a ReferenceIndexJob for asynchronous, retriable run.

Source

fn dispatch_search_index<'life0, 'async_trait>( &'life0 self, job: SearchIndexJob, ) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Enqueue a SearchIndexJob for asynchronous, retriable run.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§