Skip to main content

RenderQueue

Trait RenderQueue 

Source
pub trait RenderQueue: Send + Sync {
    // Required methods
    fn enqueue<'a>(
        &'a self,
        job: RenderJob,
    ) -> BoxFuture<'a, ServiceResult<RenderJobId>>;
    fn lease<'a>(
        &'a self,
        worker_id: &'a WorkerId,
        ttl: Duration,
    ) -> BoxFuture<'a, ServiceResult<Option<RenderLease>>>;
    fn ack<'a>(
        &'a self,
        lease_id: RenderLeaseId,
    ) -> BoxFuture<'a, ServiceResult<()>>;
    fn nack<'a>(
        &'a self,
        lease_id: RenderLeaseId,
        reason: ServiceError,
    ) -> BoxFuture<'a, ServiceResult<()>>;
    fn heartbeat<'a>(
        &'a self,
        lease_id: &'a RenderLeaseId,
        ttl: Duration,
    ) -> BoxFuture<'a, ServiceResult<()>>;
}

Required Methods§

Source

fn enqueue<'a>( &'a self, job: RenderJob, ) -> BoxFuture<'a, ServiceResult<RenderJobId>>

Source

fn lease<'a>( &'a self, worker_id: &'a WorkerId, ttl: Duration, ) -> BoxFuture<'a, ServiceResult<Option<RenderLease>>>

Source

fn ack<'a>( &'a self, lease_id: RenderLeaseId, ) -> BoxFuture<'a, ServiceResult<()>>

Source

fn nack<'a>( &'a self, lease_id: RenderLeaseId, reason: ServiceError, ) -> BoxFuture<'a, ServiceResult<()>>

Source

fn heartbeat<'a>( &'a self, lease_id: &'a RenderLeaseId, ttl: Duration, ) -> BoxFuture<'a, ServiceResult<()>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§