Skip to main content

Worker

Trait Worker 

Source
pub trait Worker: Send + 'static {
    // Required method
    fn is_work(&self) -> bool;
}
Expand description

A worker managed by WorkerPool.

Methods on this trait may be called while the pool’s internal state lock is held. Implementations must be non-blocking and must not re-enter APIs on the same pool.

Required Methods§

Source

fn is_work(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§