pub trait ClassifiedWorker<C>: Send + 'staticwhere
C: WorkerClassification,{
// Required methods
fn is_work(&self) -> bool;
fn is_valid(&self, c: C) -> bool;
fn classification(&self) -> C;
}Required Methods§
fn is_work(&self) -> bool
Sourcefn is_valid(&self, c: C) -> bool
fn is_valid(&self, c: C) -> bool
Returns whether this worker can currently serve the requested classification.
The pool still tracks capacity by the worker’s primary classification().
Sourcefn classification(&self) -> C
fn classification(&self) -> C
Returns the worker’s primary classification used for accounting and replacement.