pub trait WorkerFactory: MaybeSend + MaybeSync {
// Required methods
fn kind(&self) -> WorkerKind;
fn create(&self) -> Box<dyn Worker>;
// Provided method
fn event_interest(
&self,
) -> Option<(EventFilter<InternalEvent>, Option<usize>)> { ... }
}Required Methods§
Provided Methods§
Sourcefn event_interest(&self) -> Option<(EventFilter<InternalEvent>, Option<usize>)>
fn event_interest(&self) -> Option<(EventFilter<InternalEvent>, Option<usize>)>
The events that wake the worker: public event kinds plus an internal
predicate, and the subscription’s buffer depth (None drops nothing).
None when no event wakes it.